Hi,

I'm exporting from a datatable to excel document (not CSV because I need some cell formatting) using this method found here:

http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/08d69589-4052-410f-a85c-c38493c0a664/

Locally, it works fine, but when I upload to the server, I have been getting errors. The latest one is this:

Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space.

• To make more memory available, close workbooks or programs you no longer need.

• To free disk space, delete files you no longer need from the disk you are saving to.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space.

• To make more memory available, close workbooks or programs you no longer need.

• To free disk space, delete files you no longer need from the disk you are saving to.

Source Error:

Line 338:        // open new excel spreadsheet
Line 339:
Line 340:        Excel.Workbook workbook = excel.Workbooks.Add(Type.Missing);
Line 341:
Line 342:        Excel.Worksheet ws = (Excel.Worksheet)excel.ActiveSheet;

The administrator on the server says he has done everything he can and there is no lack of space on the server. Before, I had errors that were permissions related, but I just can't seem to get rid of this one. Because it works so well locally, I'm convinced there must be a setting on the server that I need to change. Does anyone have any ideas?

Thanks very much

Hi - cheers for the reply. The server actually uses Windows Server 2003 so not sure if that applies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.