1 Replies - 335 Views - Last Post: 11 July 2012 - 09:27 AM Rate Topic: -----

#1 JohnCollett  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 11-July 12

Using Excel Object Library if Excel not loaded on end user pc

Posted 11 July 2012 - 07:13 AM

Is it possible to use the Excel Object Library in VB6 on a client pc that does not have Excel installed?

All I am doing is opening the xls file and then immediately saving it as a tab delimited text file to parse with routines I use all the time. So if the answer to my question is NO, then any suggestions on my small task would be appreciated.

Dim objExcel As Excel.Application
Dim objWorkBook As Excel.Workbook

            ' sFilename is string for xls file
            ' sOrders is string for resulting txt file

            Set objWorkBook = objExcel.Workbooks.Open(sFilename)
            objExcel.DisplayAlerts = False
            
            objWorkBook.SaveAs sOrders, FileFormat:=xlText
            objWorkBook.Close True
            Set objWorkBook = Nothing



Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Using Excel Object Library if Excel not loaded on end user pc

#2 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 551
  • View blog
  • Posts: 2,911
  • Joined: 19-May 09

Re: Using Excel Object Library if Excel not loaded on end user pc

Posted 11 July 2012 - 09:27 AM

Yes, that is what the Excel Object Library is intended for.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1