【问题标题】:aspose cells workbook threw an exception of type 'System.FormatException'aspose 单元格工作簿引发了“System.FormatException”类型的异常
【发布时间】:2016-07-05 08:52:05
【问题描述】:

new.html的内容如下:

<table width='100%' cellspacing='0' cellpadding='2'>
    <tr>
        <td align='center' style='background-color: #18B5F0' colspan = '2'><b>Order Sheet</b></td>
    </tr>
    <tr>
        <td colspan = '2'></td>
    </tr>
    <tr>
        <td><b>Order No:</b> 100</td>
        <td><b>Date: </b>7/3/2016 12:51:00 AM </td>
    </tr>
    <tr>
        <td><b>From :</b> Company Name </td>
        <td><b>To: </b> Some Company  </td>
    </tr>
</table>
<table border = '1'>
    <tr>
        <th style = 'background-color: #D20B0C;color:#ffffff'>Id</th>
        <th style = 'background-color: #D20B0C;color:#ffffff'>Name</th>
        <th style = 'background-color: #D20B0C;color:#ffffff'>Country</th>
    </tr>
    <tr>
        <td>1</td>
        <td>John Hammond</td>
        <td>United States</td>
    </tr>
    <tr>
        <td>2</td>
        <td>Mudassar Khan</td>
        <td>India</td>
    </tr>
    <tr>
        <td>3</td>
        <td>Suzanne Mathews</td>
        <td>France</td>
    </tr>
    <tr>
        <td>4</td>
        <td>Robert Schidner</td>
        <td>Russia</td>
    </tr>
</table>

我正在使用 Aspose Cells for .NET 版本 8.8.1.0 和

这是我的代码 sn-p:

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

抛出了System.FormatException 类型的异常,异常详情如下:

数据:{System.Collections.ListDictionaryInternal}
H结果:-2146233033
帮助链接:空
内部异常:null
消息:“输入字符串的格式不正确。”
来源:“mscorlib”
StackTrace: " at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)\r\n at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)\r\n at System.Convert.ToInt32(String value)\r\n at \u0003  .\u0002(Hashtable \u0002, String \u0003)\r\n at \u0005  .\u0002(String \u0002, ArrayList \u0003)\r\ n at \u0003​ .\b()\r\n at \u0003​ .\u0002()\r\n at \u0005​ .\u0002(流 \u0002)\r\n at \u0005​ .\u0002 (字符串 \u0002)\r\n 在 Aspose.Cells.Workbook。\u0002(字符串 \u0002, LoadOptions \u0003)\r\n 在 Aspose.Cells.Workbook..ctor(字符串文件)"
TargetSite: {Void StringToNumber(System.String, System.Globalization.NumberStyles, NumberBuffer ByRef, System.Globalization.NumberFormatInfo, Boolean)}

【问题讨论】:

    标签: c# html formatexception aspose-cells


    【解决方案1】:

    请在您的帖子中查看我的reply 以供参考。请关注您的帖子以获取更多更新。

    我在 Aspose 担任支持开发人员/宣传员。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-01-14
      • 2013-08-28
      • 2015-07-18
      • 2011-02-14
      相关资源
      最近更新 更多