Excel Converter Using C++

  • Thread starter Thread starter Garfbradaz1
  • Start date Start date
G

Garfbradaz1

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
 
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)
 
Back
Top