Solved

Asp.net C# Stream to WorkBook

Posted on 2016-09-06
5
53 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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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,…
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now