ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Converter Using C++ (https://www.excelbanter.com/excel-programming/402448-excel-converter-using-c.html)

Garfbradaz1

Excel Converter Using C++
 
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



Bob Phillips

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






All times are GMT +1. The time now is 09:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com