Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array of Data exported to Excel

Status
Not open for further replies.

JSMITH242B

Programmer
Mar 7, 2003
352
GB
Hi Group,
I have an array of data which I need to export to an Excel Template which I've created.

I cribbed the following routine. On inspecting the values for the parameters they are correct. Data is posted to the excel spreadshett but a record per column and not a record per row. I need to transpose this I think.

I've tried swapping the irow, icol variables around but to no avail.
Does anyone know how I can get an array of data into an Excel template? The columns are fixed but there could be many records.

public sub insertArray(arrData, istartrow, istartcol, irow, icol)
ExcelSheet.Cells(istartrow, istartcol).Resize(irow, (icol + 1)).Value = arrData
end sub

Any pointers?

TIA
Jackie

 
You have data in array, and you want to add to Excel?

________
George, M
 
Jackie -

If you write an HTML table and use XML to write it to an excel spreadsheet, it works very well. The spreadsheet is very easy to format using HTML style. Let me know if you're interested in that path...

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top