Aspose error :Input string was not in a correct format

Hi Govardhan Yadav,


Thanks for the template file.

After an initial test, I observed the issue as you mentioned by using your sample code with your template file. I found an exception: “Input string was not in a correct format.” when loading an HTML file format. Also, your HTML file is a common HTML and does not seems to me an MS Excel oriented HTML file. We need to check if we could support such a file to be loaded via Aspose.Cells object model.
e.g
Sample code:

Workbook workbook = new Workbook();
workbook= new Workbook(@“C:\new.html”);

I have logged a ticket with an id “CELLSNET-44563” for your issue. We will look into it to figure it out (if possible) soon.

Thank you.
Hi,

This is to inform you that we have fixed your issue (logged earlier as "CELLSNET-44563"). We will soon provide the fix after performing QA and incorporating other enhancements and fixes.

Thank you.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.8.3.8 and let us know your feedback.

hi,


i tried with the latest fix of the tool u mentioned ,it is generating the output excel file.but the output excel file is empty.

this is my c# code used:
string myDir = @“C:”;
Workbook book = new Workbook(myDir+“new.html”);
book.Save(myDir + “output.xlsx”, SaveFormat.Xlsx);

is there anything i missed in my coding part?

please find the Html files i tested and output excel "output.xlsx"in attachments.

thank you in advance

Hi,

Thanks for your feedback and using Aspose.Cells.

I have tested this issue with the following sample code using your source html with the latest version:
Aspose.Cells for .NET v8.8.3.8 and found, it is generating correct output excel file.

I have attached the output excel file and screenshot showing the output in Excel 2013 for your reference.

Please make sure, you are using the latest version. You can find the current running version via the CellsHelper.GetVersion() method.

C#
//Print your cells version
Console.WriteLine(CellsHelper.GetVersion());

string myDir = @"D:\Downloads\attachments";
Workbook book = new Workbook(myDir + “new.html”);
book.Save(myDir + “output-shak.xlsx”, SaveFormat.Xlsx);

Console Output
8.8.3.8

Hi,

Thanks for using Aspose.Cells.

We have looked into your issue further and found that while loading your test1.html and converting it into excel file, the results are not good.

We have therefore logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-44593 - Output excel file is not good while converting html to excel

I have attached the source html, its output excel file generated by Microsoft Excel and by Aspose.Cells for a reference.

C#
string myDir = @"D:\Downloads\attachments";
Workbook book = new Workbook(myDir + “test1.html”);
book.Save(myDir + “output.xlsx”, SaveFormat.Xlsx);

hi,


seen your output excel file, i think autofitting the columns is required,just check it out,i didnt gone through the whole tool properly,the features like “autofiting columns and also rows” and “wrapping the data” will helps a lot, if they already exist then its fine.

the issue can be cutted down some what with below lines of code,but i have other custom htmls “test2.html & test3.html & test4.html” which are not loading properly into Excel as Interop does.


Workbook book = new Workbook(txtHtmlPath.Text);
WorksheetCollection wsc=book.Worksheets;
foreach (Worksheet ws in wsc)
{
ws.AutoFitColumns();
}
string output = txtHtmlPath.Text.Replace(".html", string.Format(“Aspose{0}.xlsx”,DateTime.Now.ToString(“dd_MM_yyyy_hhmmss”)));
book.Save(output, SaveFormat.Xlsx);

here in “txtHtmlPath” we pass the html file path

find the html files and their output excel files in attachments “test234.zip”.

can you please help me on this?

thank you in advance


Hi,


Thanks for the template files (HTMLs and Excel files).

After an initial test, I am able to reproduce the issue on our end. I found the output Excel files are not good (there are some border lines and other formatting issues) while converting your attached HTMLs (“test2.html”, “test3.html” and “test4.html”) to Excel file format via Aspose.Cells APIs.
e.g
Sample code:

string myDir = @“D:\Downloads\attachments”;

Workbook book = new Workbook(myDir + strFilePath);
book.Save(myDir + “output.xlsx”, SaveFormat.Xlsx);

I have logged three separate issues for your three attached files. The issue ids are as follows:
  • CELLSNET-44595 - "test2.html"
  • CELLSNET-44596 - "test3.html"
  • CELLSNET-44597 - "test4.html"

Our concerned developer from product team will evaluate your issues soon.

Once we have an update on it, we will let you know here.

Thank you.

The issues you have found earlier (filed as CELLSNET-44563) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi team aspose,


By when can i expect the following logged issues can be resolved:
  • CELLSNET-44595
  • CELLSNET-44596
  • CELLSNET-44597
thank you

Hi,

Thanks for your posting and using Aspose.Cells.

We are afraid there is no update for you at this moment regarding these issues. However, we have logged your comment in our database against these issues and requested the product team to provide some fix or ETA for these issues. Once there is some news for you, we will update you asap by posting in this thread.

I am getting the same issue with 8.4.2.0 version of Aspose. Do we have a quick fix available for this version as well or any of the hotfix provided for another version can work for this one?

Please confirm.

Hi Feridun,


Thank you for contacting Aspose support.

Please provide us the problematic sample spreadsheet along with an executable piece of code for investigation. We will test it against the latest available version, that is; 16.10.10 at the moment and log appropriate ticket in our database if the problem persists with the aforementioned release. You can test the case on your side as well by downloading the latest version from here. In case the problem persists, please create a new thread providing the problematic sample and code to reproduce the issue along with complete stack trace that you have observed on your end.
Hi,

Regarding the issue "CELLSNET-44595", for now, I am afraid, we can't support to import the HTMLwhich has irregular HTML tags and contains many tags that are not closed correctly.

If in future, we could support it or we have another update on it, we will let you know here.

Thank you.

Hi,


This is to inform you that we have fixed your issue logged earlier as “CELLSNET-44597”. The fix will be shared in 1-2 days after performing QA and including other enhancements and fixes.

Thank you.
Hi,

Please try our latest version/fix: Aspose.Cells for .NET v16.12.7:

Your issue "CELLSNET-44597" should be fixed in it.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSNET-44597) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi,


This is to inform you that we have fixed your issues (“CELLSNET-44595” and “CELLSNET-44596”). We will soon provide you the fix after performing QA and incorporating other enhancements and fixes.

Keep in touch.

Thank you.

The issues you have found earlier (filed as CELLSNET-44595;CELLSNET-44596) have been fixed in Aspose.Cells for .NET 17.6.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

@aggovardhan005,

This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-44593”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.