Solved

Asp.net C# Stream to WorkBook

Posted on 2016-09-06
5
97 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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,…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

756 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