Export to Excel

Hi,

I have a view where i have 700 records. I have an Export All button which exports all docs to an Excel. This is working fine on my Local. When i put the same code on a server i am getting an OLE Automation Error. I don’t know what to change. The error line is as below.

Call excelSheet.UsedRange.Sort(excelSheet.Cells(1, iSortBy1), , _

	excelSheet.Cells(1, iSortBy2), , , , , XLYES)

Can anyone help me on this.

Thanks in Advance.

Subject: Export to Excel

Hello,

I also had almost similar proble. But found the solution on the forum. Had to modify my code . Here is the bit which you might have to modify for sorting .

Set XLSortRange = xlWorksheet.range(“A2”+“:J”+Cstr(intCount))

Call XLSortRange.Sort(XLSortRange.Cells(2,1), 1)

I’ve hardcoded the Start range .

For more info , here is the thread on the R5 Developer forum:

http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/5d7600f2da1111fd85256a78005304bf?OpenDocument&Highlight=0,excel,macro,sort

HTH

Tom

Subject: Export to Excel

Does the server have the same version of Excel as your local machine?

We had a similar requirement to export to an Excel spreadsheet. We did not allow Excel objects to be created on the server. We only allowed the exports to occur locally with the version of Excel installed on the client. Then the finished Excel file can be stored in a document on the server.