View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Excel Converter Using C++

Just create an instance of Excel, open the workbook, an save it as CSV. No
need to worry about the formats.

Can't help you with the C"" code I am afraid, but in VB/VBA it would be

Dim XLApp As Object
Dim XLWB As Object

Set XLApp = CreateObject("Excel.Application")
XLApp.Visible = True
Set XLWB = XLApp.Workbooks.Open("C:\test\SP Test.xls")
XLWB.SaveAs "c:\test\SP Text.csv", FileFormat:=6 'xlCSV
Set XLWB = Nothing
XLApp.Quit
Set XLApp = Nothing



--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Garfbradaz1" wrote in message
...
Hi Guys,

I have just started a C++ unmanaged college course and i want to write an
object to help me read into an Excel (.XLS) file, and convert it to CSV.
Im
having problems knowing where to start! I have a BIGGGGG document
identifying
how Excel is saved into its various componets (i.e. BIFF) and this isnt
helpful at all.

Using Visual Studios 2005, how do i identify what the rows/columns data
is?
Are there any Objects already out there that i can learn from??

Any tips would be helpful!

Chars

G'Man