need help on generate report to excel
-
hi all.. I am working on a program using visual c++ that has a feature to generate reports in Excel format but I still confused how to do it. Can anybody help? thx
-
hi all.. I am working on a program using visual c++ that has a feature to generate reports in Excel format but I still confused how to do it. Can anybody help? thx
Excel has an XML schema in which it can save/read spreadsheets. You can try saving a simple document as XML from Excel itself to see the way it looks, or you can obtain full documentation here: Office 2003: XML Reference Schemas[^] I suggest generating first an XML with just the needed data, and then using XSL transformations to convert it to any other format (including Excel's XML schema, but you might also convert it to an HTML page). That way you can separate the logic needed to obtain the data from the presentation format, which is better both in terms of ease of development and of maintenance. The transformation may be done in memory without actually saving an intermediate file. Hope that helps, -- jlr http://jlamas.blogspot.com/[^]
-
hi all.. I am working on a program using visual c++ that has a feature to generate reports in Excel format but I still confused how to do it. Can anybody help? thx
-
Excel has an XML schema in which it can save/read spreadsheets. You can try saving a simple document as XML from Excel itself to see the way it looks, or you can obtain full documentation here: Office 2003: XML Reference Schemas[^] I suggest generating first an XML with just the needed data, and then using XSL transformations to convert it to any other format (including Excel's XML schema, but you might also convert it to an HTML page). That way you can separate the logic needed to obtain the data from the presentation format, which is better both in terms of ease of development and of maintenance. The transformation may be done in memory without actually saving an intermediate file. Hope that helps, -- jlr http://jlamas.blogspot.com/[^]
but if I'm using this method...can the xls file be opened at Ms Excel XP or lower? Because as I know, only Ms Excel 2003 that support XML. Is there any object library that I can use?(I'm using visual c++ 6.0) thx.
-
but if I'm using this method...can the xls file be opened at Ms Excel XP or lower? Because as I know, only Ms Excel 2003 that support XML. Is there any object library that I can use?(I'm using visual c++ 6.0) thx.
firebolt77 wrote: but if I'm using this method...can the xls file be opened at Ms Excel XP or lower? I have Office XP and Excel can save to XML. I don't know about previous versions, but try it yourself. Open an excel document, select File / Save As, and look at the available formats. firebolt77 wrote: Is there any object library that I can use? I don't know, there might be; I didn't search. -- jlr http://jlamas.blogspot.com/[^]
-
firebolt77 wrote: but if I'm using this method...can the xls file be opened at Ms Excel XP or lower? I have Office XP and Excel can save to XML. I don't know about previous versions, but try it yourself. Open an excel document, select File / Save As, and look at the available formats. firebolt77 wrote: Is there any object library that I can use? I don't know, there might be; I didn't search. -- jlr http://jlamas.blogspot.com/[^]
thx..I've download the references schema..it very helpful. Can u give me some links that provide more examples about the references schema? thx..
-
i too worked for same thing in ur project, what i did is create file in write mode in with :cool:"filename.xls" by following right tabs and newlines bye.......... Satishvarma.E
if I use this method, will the cell be resized automatically? Can I make a table(with lines) using this method? thx..
-
firebolt77 wrote: but if I'm using this method...can the xls file be opened at Ms Excel XP or lower? I have Office XP and Excel can save to XML. I don't know about previous versions, but try it yourself. Open an excel document, select File / Save As, and look at the available formats. firebolt77 wrote: Is there any object library that I can use? I don't know, there might be; I didn't search. -- jlr http://jlamas.blogspot.com/[^]
I've read the microsoft office schema, but it is very complex and I didn't understand. I even try to make an excel using xml by following the instruction from ms office schema, but it doesn't work. Can you give me some examples or maybe other links? thx.