-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHelloWorld.js
32 lines (24 loc) · 1.43 KB
/
HelloWorld.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//*******************************************************************************************//
// //
// Get Your API Key: https://app.pdf.co/signup //
// API Documentation: https://developer.pdf.co/api/index.html //
// //
// Note: Replace placeholder values in the code with your API Key //
// and file paths (if applicable) //
// //
//*******************************************************************************************//
var document = WScript.CreateObject('Bytescout.Spreadsheet.Spreadsheet');
// Add new worksheet
var worksheet = document.Workbook.Worksheets.Add("HelloWorld");
// get cell value
var cell = worksheet.Item(0,0); // you can also use worksheet.Cell("A1") as well
// set cell value
cell.Value = "Hello, World!";
// delete output file if exists already
var fso = WScript.CreateObject('Scripting.FileSystemObject');
if (fso.FileExists('Output.xls')) { fso.DeleteFile('Output.xls'); }
fso = null;
// save document
document.SaveAs ('Output.xls');
// close Spreadsheet
document = null