forked from sheetjs/docs.sheetjs.com
correct curl flags (h/t Kip R)
This commit is contained in:
parent
d6f964ca26
commit
5b2e3e4786
@ -175,7 +175,7 @@ yarn remove xlsx`}
|
||||
version is available at <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}</a></p></li></ol>
|
||||
|
||||
<CodeBlock language="bash">{`\
|
||||
curl -o https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
curl -O https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</CodeBlock>
|
||||
|
||||
2) Create a `vendor` subfolder at the root of your project:
|
||||
|
@ -165,7 +165,7 @@ yarn remove xlsx`}
|
||||
version is available at <a href={"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}>{"https://cdn.sheetjs.com/xlsx-" + current + "/xlsx-" + current + ".tgz"}</a></p></li></ol>
|
||||
|
||||
<CodeBlock language="bash">{`\
|
||||
curl -o https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
curl -O https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
|
||||
</CodeBlock>
|
||||
|
||||
2) Create a `vendor` subfolder at the root of your project:
|
||||
|
@ -228,20 +228,15 @@ HTML tags include `html`, `table`, `head`, `meta`, `script`, `style`, `div`
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary><b>Why are random text files valid?</b> (click to hide)</summary>
|
||||
<summary><b>Why are random files valid?</b> (click to hide)</summary>
|
||||
|
||||
Excel is extremely aggressive in reading files. Adding the XLS extension to any
|
||||
text file (where the only characters are ANSI display chars) tricks Excel into
|
||||
processing the file as if it were a CSV or TSV file, even if the result is not
|
||||
useful! This library attempts to replicate that behavior.
|
||||
file tricks Excel into processing the file.
|
||||
|
||||
The best approach is to validate the desired worksheet and ensure it has the
|
||||
expected number of rows or columns. Extracting the range is extremely simple:
|
||||
If the file matches certain heuristics, Excel will use a format-specific parser.
|
||||
|
||||
```js
|
||||
var range = XLSX.utils.decode_range(worksheet['!ref']);
|
||||
var ncols = range.e.c - range.s.c + 1, nrows = range.e.r - range.s.r + 1;
|
||||
```
|
||||
If it cannot deduce the file type, Excel will parse the unknown file as if it
|
||||
were CSV or TSV. SheetJS attempts to replicate that behavior.
|
||||
|
||||
</details>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user