aspose单元格工作簿抛出类型为'System.FormatException'的异常

本文关键字:System FormatException 异常 工作簿 单元格 类型 aspose | 更新日期: 2023-09-27 17:54:41

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>

我在。net版本8.8.1.0和

中使用Aspose Cells这是我的代码片段:

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

抛出了一个类型为System.FormatException的异常,异常细节如下:

数据:{System.Collections.ListDictionaryInternal}
HResult: -2146233033
HelpLink:空
InnerException:空
消息:"输入字符串格式不正确。"
来源:"mscorlib"
StackTrace: " at System.Number. "stringtonnumber(字符串str, NumberStyles选项,NumberBuffer&# # # # # # # # # # # # # # # # # # # # #ParseInt32(字符串s, NumberStyles style, NumberFormatInfo info)'r'n at System.Convert。ToInt32(字符串值)'r'n 'u0003。'u0002(Hashtable 'u0002, String 'u0003)'r'n ' 'u0005。'u0002(String 'u0002, ArrayList 'u0003)'r'n at 'u0003 .'b()'r'n at 'u0003 .'u0002()'r'n at 'u0005。'u0002(Stream 'u0002)'r'n at 'u0005。'u0002(字符串'u0002)'r'n at asset . cells . workbook。'u0002(String 'u0002, LoadOptions 'u0003)'r'n at asset . cells . workbook…男星(字符串文件)"
TargetSite:{无效stringtonnumber(系统。字符串,System.Globalization。NumberStyles, NumberBuffer ByRef, System.Globalization。[本布尔)}

aspose单元格工作簿抛出类型为'System.FormatException'的异常

请参考我在你的帖子里的回复。请关注您的帖子以获得进一步的更新。

我是Aspose的支持开发者/布道者