xhtml format support #458

Closed
opened 2016-08-17 01:52:17 +00:00 by tienne · 0 comments
tienne commented 2016-08-17 01:52:17 +00:00 (Migrated from github.com)

i'm use

var workbock = XLSX.readFile(file);

error is as follows

Unhandled rejection TypeError: Cannot read property '0' of undefined
    at parse_xlml_xml (myproject\node_modules\xlsx\xlsx.js:8816:32)
    at parse_xlml (myproject\node_modules\xlsx\xlsx.js:9172:53)
    at readSync (myproject\node_modules\xlsx\xlsx.js:11394:21)
    at Object.readFileSync (myproject\node_modules\xlsx\xlsx.js:11404:9)
    at Object.exports.excelUpload.run (myproject\product.js:422:25)

the file is xhtml format excel.xls
hero file contents

<html xmlns:o="urn:schemas-microsoft-com:office:office"
      xmlns:x="urn:schemas-microsoft-com:office:excel"
      xmlns="http://www.w3.org/TR/REC-html40">
<head>
  <meta http-equiv=Content-Type content="text/html; charset=utf-8">
  <meta name=ProgId content=Excel.Sheet>
  <meta name=Generator content="Microsoft Excel 11">
<body>

<style>
  br{mso-data-placement:same-cell;}
  td{font-size:9pt}
  .str_css{mso-number-format:"\@";}
</style>

<table border=1>
  <tbody align=center>
  <tr bgcolor=#CCFFCC>
    <td>*code</td>
    <td>model</td>
    <td>brand</td>
    <td>maker</td>
    <td>*madein</td>
    <td>*name</td>
  </tr>
  <tr>
    <td class=str_css>1</td>
    <td class=str_css></td>
    <td class=str_css></td>
    <td class=str_css></td>
    <td class=str_css>us</td>
    <td class=str_css>T-shirt</td>
  </tr>
</table>

how can parse this file help me

i'm use ``` var workbock = XLSX.readFile(file); ``` error is as follows ``` Unhandled rejection TypeError: Cannot read property '0' of undefined at parse_xlml_xml (myproject\node_modules\xlsx\xlsx.js:8816:32) at parse_xlml (myproject\node_modules\xlsx\xlsx.js:9172:53) at readSync (myproject\node_modules\xlsx\xlsx.js:11394:21) at Object.readFileSync (myproject\node_modules\xlsx\xlsx.js:11404:9) at Object.exports.excelUpload.run (myproject\product.js:422:25) ``` the file is xhtml format excel.xls hero file contents ``` <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 11"> <body> <style> br{mso-data-placement:same-cell;} td{font-size:9pt} .str_css{mso-number-format:"\@";} </style> <table border=1> <tbody align=center> <tr bgcolor=#CCFFCC> <td>*code</td> <td>model</td> <td>brand</td> <td>maker</td> <td>*madein</td> <td>*name</td> </tr> <tr> <td class=str_css>1</td> <td class=str_css></td> <td class=str_css></td> <td class=str_css></td> <td class=str_css>us</td> <td class=str_css>T-shirt</td> </tr> </table> ``` how can parse this file help me
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#458
No description provided.