|
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.
|
|
|
|
|
Hi there, a great effort. I'd like to point out a few issues I've found with the Encoder. I'd be very grateful if someone could post a solution, particularly to (1).
1) When writing large Decimal values they don't seem to be encoded correctly. E.g. I pass in 5690000 as Decimal through the encoder - when opening up the spreadsheet in Excel, it reports the value written as -5047418.24.
2) The "EncodeCell" method in WorkSheetEncoder.cs does not contain support for the C# "short" data type. Therefore when passing anything as Int16/Short you get an "Invalid cell value".
Thanks
|
|
|
|
|
Fixed now.
I am happy to work with people doing great projects.
|
|
|
|
|
Congratulations!! Very good work!
|
|
|
|
|
How I can get background color in cell? I'm getting only ColorIndex but don't know how translate it to RGB.
|
|
|
|
|
谢谢你,很好很棒。
A Dream About Software。
|
|
|
|
|
谢谢!
I am happy to work with people doing great projects.
|
|
|
|
|
Is there any way to determine if column has been set to Hidden?
|
|
|
|
|
Downloaded this package, looks like it could be what I needed. Created VS2008 version of project, added signing, made all warnings errors. Corrected a couple of warnings in code (search for "ABr" in solution). Started on XML documentation path but too many public entities (977
I have posted the VS2008 package on my google site at http://sites.google.com/site/softwareabnet/updated-excelreader-by-liu-junfeng[^]
|
|
|
|
|
|
Hey guy,
First, thanks for the tremendous effort in the lib. I've been working thru making active changes in the codebase (e.g. ColumnWidths from internal to public) because I'm using your lib as a lib (rather than an integral part of my app, so internal doesn't apply). I'll be working thru more bits and pieces (like the semantics of setting column / cell attributes) and when I'm done I'll post up changes on your site. I'll also post up the reasons for the changes, etc.
Thanks for the link, and keep up the great work.
Andy
|
|
|
|
|
Please work around the latest code, some issues are already fixed.
I am happy to work with people doing great projects.
|
|
|
|
|
Hi,
I've downloaded two versions of your project - one in Aug. 2008 and another in Feb. 2009. On both versions, I get an error in about 1/2 of my files (all created using Excel 2003).
The error occurs in the Record.cs file, in the ReadString() method. Specifically, the error occurs when the code then reads an incorrectly large value for the variable "stringlength" (representing the length of the string to read), or the variable "size," (representing the length of the Asian phonetic settings). This large value creates an exception. When the error occurs, these values are typically in the tens or hundreds of thousands.
Through testing, I've found that the error seems to occur when the end of the stream is reached, and your code switches to a continued record using SwitchToContinuedRecord(). This occurs on line 3 of the ReadString() method. I've been unable to determine the error. But maybe its just because the file is from Excel 2003. Or maybe its because about 30-35 records end up in the "default" case in the Record.Read() method.
Regardless, I want to say thanks for creating your tool. If you're able to figure out the error I described above, please let me know (sunilshenoi@yahoo.com). I can provide sample files that generate the error, if you'd like. Good luck.
|
|
|
|
|
|
Hi! Liu, I have add a new Issue in your project, nothing serious, but I think you may separate the WinForms from your project, creating a DLL part for anyone who (me for example) want to use the code...
I think I will made this, anyway for my develop needs, if you like... I can send you what I have done....
Keep the great work!
|
|
|
|