Click here to Skip to main content
15,896,730 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an array of class(say cols 12 and rows 20) which i need to write into an excel sheet.
Is there any way to write the array into a range of an excel sheet at a stretch without looping each cell as like in C#.

Please let know any additional details needed. Thanks in advance.
Posted
Updated 24-May-15 20:22pm
v2
Comments
CPallini 25-May-15 3:31am    
What's wrong with looping?

1 solution

your three solutions are

1. use the OLEDB JET Driver for Excel[^]
2. the object model for Excel[^]
3. the Office XML format[^]

The first requires you have a C++ OLEDB client library
The second requires using COM and messing with the godawful Excel Automation model (here we use an Active Script Host in C++ and let a VB script do all the heavy lifting, it's easier to debug, and develop that way)
The third could be done by turning your raw data into a basic XML doc then XSLT'ing it to the required format - again, this involves either a third party XML/XSLT client or getting your hands dirty with MSXML[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900