Skip to content

Instantly share code, notes, and snippets.

View SheetJSDev's full-sized avatar
📗
Getting Sheet Done

Eric P Sheets SheetJSDev

📗
Getting Sheet Done
View GitHub Profile
#!/bin/bash
set -o pipefail
UZIPVER=$(date "+0.%Y%m%d.0")
# Remove and re-clone
rm -rf UZIP.js
git clone https://github.com/photopea/UZIP.js/
cd UZIP.js
# Generate package.json
WORKSHEET FILE FORMAT
FROM LOTUS
INTRODUCTION AND QUICK REFERENCE
Copyright(c) 1984, Lotus Development Corporation
161 First Street
Cambridge, Massachusetts 02142
(617) 492-7171
Electronic Edition, December, 1984
@SheetJSDev
SheetJSDev / rich_text_stress.html
Created October 7, 2014 05:23
rich_text_stress.xlsx clipboard from Excel 2011
<html xmlns:v="urn:schemas-microsoft-com:vml"
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 14">
<link id=Main-File rel=Main-File
@SheetJSDev
SheetJSDev / main.js
Created August 22, 2014 14:40
XLSX writing custom date formats
/* this sample was run in nodejs */
var XLSX = require('xlsx');
/* build up a very simple workbook */
var wb = {
SSF: XLSX.SSF.get_table(),
SheetNames: ["Sheet1"],
Sheets: {
Sheet1: {
'!ref': 'A1:A1',
@SheetJSDev
SheetJSDev / xlsx2socialcalc.js
Created August 3, 2014 17:43
xlsx2socialcalc
/* xlsx2socialcalc.js (C) 2014 SheetJS -- http://sheetjs.com */
/* License: Apache 2.0 */
/* vim: set ts=2: */
var sheet_to_socialcalc = (function() {
var header = [
"socialcalc:version:1.5",
"MIME-Version: 1.0",
"Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"
].join("\n");
UEsDBBQABgAIAAAAIQDpA5ilpwEAAGcHAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADMld1O4zAQhe+R9h0i365ityygFWrKBbCXgAQ8wNSeNqaObXlMad+eSQoVu+q2VFSiN/lz5pxvbOt4cDFvXDHDRDb4SvRlTxTodTDWTyrx+PCn/C0KyuANuOCxEgskcTH8cTR4WESkgqs9VaLOOZ4rRbrGBkiGiJ5HxiE1kPk1TVQEPYUJquNe70zp4DP6XOZWQwwHVziGZ5eL6zl/XpJwuSgul/+1VpWAGJ3VkBlUtaNqbV1CRxsKZ978Q1e+kUmu7MSptpF+
/* generate CSV output for every sheet */
function to_csv(workbook) {
var result = [];
workbook.SheetNames.forEach(function(sheetName) {
var csv = XLSX.utils.make_csv(workbook.Sheets[sheetName]);
if(csv.length > 0){
result.push("SHEET: " + sheetName);
result.push("");
result.push(csv);
}
/* require XLSX */
var XLSX = require('XLSX')
function datenum(v, date1904) {
if(date1904) v+=1462;
var epoch = Date.parse(v);
return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);
}
function sheet_from_array_of_arrays(data, opts) {