Solved

Asp.net C# Stream to WorkBook

Posted on 2016-09-06
5
115 Views
Last Modified: 2016-09-26
Hi,

 I'm writing to Excel large Data, but I'm getting the attached dump

Thanks
Stream.jpg
0
Comment
Question by:Jamil Muammar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 4

Assisted Solution

by:Steven Kribbe
Steven Kribbe earned 500 total points
ID: 41785726
What is the size of the data you are trying to stream? If it is too big it does not fit in memory. In order to stream large files without using a lot of memory, you need to apply a chunking technique. Chopping up the data in small pieces for the client to consume. How exactly are you calling this code. VBA?
0
 

Author Comment

by:Jamil Muammar
ID: 41785731
it's C#

can you please supply example

Thanks
0
 
LVL 4

Accepted Solution

by:
Steven Kribbe earned 500 total points
ID: 41785745
0
 

Author Comment

by:Jamil Muammar
ID: 41804700
can you please give an example how to use ChunkedMemoryStream by writing to Excel

Thanks
0
 

Author Comment

by:Jamil Muammar
ID: 41804846
When I usee the XSSF in NPOI.DLL

In workbook.write, I got the dump

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.


attached screenshot
Untitled.png
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question