Hello,
I’m new to Aspose. I use aspose.cell and I’m trying to convert Excel (.xls) to HTML. In the Excel file there are cells with big texts. The text have automatically line breaks so the they are shown completly and correctly in the cell.
I convert it so:
string path = @“I:\temp\test.xlsx”;
Workbook workbook = new Workbook(path);
//Worksheet worksheet1 = workbook.Worksheets[0];
workbook.Save(path + “.out.html”, Aspose.Cells.SaveFormat.Html);
It creates an HTML. But the texts in the HTML table cells have no line breaks. The text is written in one line over the border of the table cell.
What can I do to put the text correctly into the table cell?
Regards
Ringo
Hi,
Hi,
I send a test file in the attachment.
Partly I could solve it. I replace the space with \n before I save in html.
string text = “”;
foreach (Cell c in cells)
{
if (c.Value != null)
{
text = c.Value.ToString();
text = text.Replace(" ", “\n”);
c.Value = text;
}
}
But with long words (“testloooooooooooooooooong” in the test.xlsx) I still have no solution.
The output file I cannot send, .htm its not allowed. But there are no line breaks inside the cells.
Regards
Ringo
Hi,
Hi,
We have fixed this issue. Please download: Aspose.Cells for .NET v7.0.4.3
Thanks and Kind Regards,
Hello,
and thanks for the fix.
I tryed it, between words there are line breaks now.
But with long words (‘testloooooooooong’ in test.xlsx), which are longer than the cell width, there is still no line break. The words are written over the cells into the next cell. That should not be. In this case the word should wrap at the end of the cell. Could you still fix it, else I cannot use it to convert in html.
Thank you
GEWA-COMP GmbH
Hi,
Here are the input Excel, the output html and the output screenshot files.
Thank you
GEWA-COMP GmbH
Hi,
Sample code:
Workbook workbook = new Workbook(“e:\test2\test.xlsx”);
workbook.Save(“e:\test2\outtest.html”, SaveFormat.Html);
I have reopened your issue and we will soon look into it.
Hi,
Hello,
could you find out something?
The word wrap with words which are longer than the cell width still does’nt work in Aspose.Cells for .NET 7.4.0.
Its like you said, in IE it works better but not correct, there is no word wrap too. And in Firefox and Chrome the word is written into the next cell.
Thank you.
Hi,
Hi,
it seems that we have the same effect with missing word wrap in the newest version.
Attached please consider the example for your isssue fixing.
Thanks in advance.
Greetings,
Sacha End
Hi Sacha,
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Please download and try this fix: Aspose.Cells for .NET v7.4.1.1 and let us know your feedback.
Hello,
thank you, but as HTML it don’t work. Now its displayed only the first column. So before it was better.
Regards
GEWA-COMP
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
We have logged your comments in our database. We will look into your issue and help you asap
Hi,GEWA-COMP GmbH:Hello,
thank you, but as HTML it don't work. Now its displayed only the first column. So before it was better.
Regards
GEWA-COMP
Thanks for your posting and using Aspose.Cells.
We are unable to understand your posting. Please elaborate yourself more with sample code and screenshots.
Hi,
Thanks for using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v7.7.1.2 and let us know your feedback.
The issues you have found earlier (filed as CELLSNET-40161) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.