|
|
Huh?? This libray does not use interop, ergo Excel is not required to be installed on the client machine.
|
|
|
|
|
Could anyone give me a little code-sample on how to get the markup for a cell (fonts, border, color etc).
I'm trying to get it running in ASP.NET (C#), but I cannot seem to get it right.
Thanks in advance,
K. van der Werf
|
|
|
|
|
I am also looking for a solution on how to do this.
|
|
|
|
|
I am new to the boards- but I don't see a solution for this. Is there any example or quick place in the documentation to see how to adjust the color, font etc. of a given cell? I see that it is in Format, but I don't seem to be doing something right.
thanks,
-scott
|
|
|
|
|
Exception of type 'System.OutOfMemoryException' was thrown.
at
this.MasterSectorAllocationTable = new List<int>(NumberOfSecIDs);
The number of sector IDs is 1836592733. Is that to big for an int?
Michael S. Flynn
|
|
|
|
|
I am writing an extra row to an existing Excle spreadsheet and after writing the file I try to reopen the file and receive an error:
EndOfStreamException was unhandeld
Unable to read beyond te end of the stream;
When I open the file in Excel and save it with Excel I am able to open it with my program again.
Any idea why this is happening?
|
|
|
|
|
Hello,
first thanks for a nice project.
What would be the easiest way to directly encode a Workbook object to the Output-stream of a Html webpage Response object without needing to first save the information to file.
E.g. The user uploads an Excel file with some information that is processed and added to by the server which than should return the information to the user by letting them decide where to save the new/modified file.
Any idea about the best/easiest way to accomplish this?
Best regards,
Henrik
|
|
|
|
|
Implemented by r47. You can use Workbook's Save(Stream stream) method.
I am happy to work with people doing great projects.
|
|
|
|
|
I am able to generate the excel with my Webpage using the following codes. The file download dialog will be shown and user can save the file on desktop.
When I open the file, it displays this message "Lost document summary information.". But the file appear correct as it contains all data and worksheets. Any idea what could be the reason? Being trying all ContentType, Response method, but none seems to be able to remove that error message.
Thanks.
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment;filename=excelfile1.xls");
WorkbookEncoder.Encode(workbook, Response.OutputStream);
Response.End();
|
|
|
|
|
Hi, not sure if this is the best method I should be using.
I overload the 2 methods in your project to pass in MemoryStream and I am able to export excel with ease from my ASPX.
public static CompoundDocument Create(MemoryStream stream) - CompountDocument.cs
public MemoryStream SaveStream(MemoryStream streamInput) - Workbook.cs
Codes use in my ASPX page to generate the excel file on the fly.
Response.Clear();
Response.ContentType = "application/ms-excel";
Response.AddHeader("Content-Disposition", "attachment;filename=XLSFormat.xls");
MemoryStream streamOutput = new MemoryStream();
MemoryStream streamInput = new MemoryStream();
streamOutput = workbook.SaveStream(streamInput);
Response.OutputStream.Write(streamOutput.ToArray(), 0, streamOutput.ToArray().Length);
Response.Flush();
Response.Close();
Response.End();
|
|
|
|
|
maxnm,
Can you send the 2 overloaded methods on this thread.
thanks.
|
|
|
|
|
I'm also interested about trying overloaded Create() and SaveStream() methods. Where to find their source code ? Andrus
|
|
|
|
|
|
Document summary information is not encoded to the generated file. So the message "Lost document summary information." is right about this. But it depends on the Viewer/Editor to show this message or not. Of course we should better support encoding Document summary information.
I am happy to work with people doing great projects.
|
|
|
|
|
Hello,
with this Excel .NET component you can easily create and download Excel files from your Excel ASP.NET applications without using Excel Automation.
Here is a sample Excel C# code how to export DataSet as XLS stream:
var ef = new ExcelFile();
foreach (var dataTable in dataSet.Tables)
{
var ws = ef.Worksheets.Add(dataTable.TableName);
ws.InsertDataTable(dataTable, "A1", true);
}
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment; filename=Employee.xls");
ef.SaveXls(Response.OutputStream);
Response.End();
|
|
|
|
|
Hi,
really great job, tnx.
In my program I read Excel by one row at a time.
How can I know when I reached the last row ?
Respectfully,
Exceter.
|
|
|
|
|
int row = 0;
int col = 0;
while (sheet.Cells[row, col].StringValue != "")
{
lv.Items.Add(sheet.Cells[row, col].StringValue);
col++;
}
|
|
|
|
|
worksheet.Cells.LastRowIndex
I am happy to work with people doing great projects.
|
|
|
|
|
tnx, it works..
Respectfully,
Exceter.
|
|
|
|
|
I noticed all my dates are coming out with an extra day added onto them, ie: 01-Apr-2008 became 02-Apr-2008.
I found this code in SharedResource.cs I was unsure about...
public double EncodeDateTime(DateTime value)
{
double days = (value - BaseDate).Days;
if (days > 365) days++;
return days;
}
Why does an extra day get added on if the number of days is greater than 365? I thought it might have something to do with the 1900 leap year and base dates being 31-Dec-1899, but the value of BaseDate when run through in code is actually 01-Jan-1904 which means there doesn't need to be an extra day added for the leap year anyway?
Can anyone help?
|
|
|
|
|
|
Will your library work with Excel documents saved in Excel 2007 Format? I have a code sample that reads through and prints the contents of an Excel 2003 file and that works just fine. Then I tried the same code to read an Excel 2007 file (.xlsx file) and I get an OutOfMemoryException when trying to Open the file via Workbook.Open(filename) call.
I'm trying this in a VS2008 solution.
Thanks,
Beth
|
|
|
|
|
Please can you show to me example how I can get background color for cell?
|
|
|
|
|
I took a peek at the dll using ildasm and am of the opinion that the functionality you're looking for isn't there... at least not yet.
|
|
|
|