ByteScout Spreadsheet SDK – JavaScript – Create Spreadsheet

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – JavaScript – Create Spreadsheet

ByteScout Spreadsheet SDK – JavaScript – Create Spreadsheet

HelloWorld.js

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


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next