<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Parse Excel to JSON format in Community Central forum</title>
    <link>https://www.servicenow.com/community/community-central-forum/parse-excel-to-json-format/m-p/3520432#M6584</link>
    <description>&lt;P&gt;I am trying to read an attachment file from a attachment variable to parse data in it and build a JSON payload to use that information on a variable. to make any progress , I cant get past the parser.parse line, not seeing any error too. testing below script in a fix script and then use it it in a client callable script include&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; var jsonData = [];
 var attachmentSysId = '12f78a92938407509f98fa252603d6d6';
 gs.info('AttachmentSysId---&amp;gt;' + attachmentSysId);
 // Uses sn_impex namespace to parse attachment stream
 var parser = new sn_impex.GlideExcelParser();
 var attachmentStream = new GlideSysAttachment().getContentStream(attachmentSysId);
 gs.info('AttachmentStream---&amp;gt;' + attachmentStream);

 if (attachmentStream) {
     gs.info('AttachmentStreamExists');
     parser.parse(attachmentStream);
     while (parser.next()) {
         // Collects row data into the JSON array
         gs.info('ParserExists');
         jsonData.push(parser.getRow());
     }
 }

 gs.info(JSON.stringify(jsonData));


Output:

*** Script: AttachmentSysId---&amp;gt;12f78a92938407509f98fa252603d6d6
*** Script: AttachmentStream---&amp;gt;com.glide.communications.GlideScriptableInputStream@74f0306d
*** Script: AttachmentStreamExists
*** Script: []&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Apr 2026 00:08:01 GMT</pubDate>
    <dc:creator>monikagmk12</dc:creator>
    <dc:date>2026-04-07T00:08:01Z</dc:date>
    <item>
      <title>Parse Excel to JSON format</title>
      <link>https://www.servicenow.com/community/community-central-forum/parse-excel-to-json-format/m-p/3520432#M6584</link>
      <description>&lt;P&gt;I am trying to read an attachment file from a attachment variable to parse data in it and build a JSON payload to use that information on a variable. to make any progress , I cant get past the parser.parse line, not seeing any error too. testing below script in a fix script and then use it it in a client callable script include&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; var jsonData = [];
 var attachmentSysId = '12f78a92938407509f98fa252603d6d6';
 gs.info('AttachmentSysId---&amp;gt;' + attachmentSysId);
 // Uses sn_impex namespace to parse attachment stream
 var parser = new sn_impex.GlideExcelParser();
 var attachmentStream = new GlideSysAttachment().getContentStream(attachmentSysId);
 gs.info('AttachmentStream---&amp;gt;' + attachmentStream);

 if (attachmentStream) {
     gs.info('AttachmentStreamExists');
     parser.parse(attachmentStream);
     while (parser.next()) {
         // Collects row data into the JSON array
         gs.info('ParserExists');
         jsonData.push(parser.getRow());
     }
 }

 gs.info(JSON.stringify(jsonData));


Output:

*** Script: AttachmentSysId---&amp;gt;12f78a92938407509f98fa252603d6d6
*** Script: AttachmentStream---&amp;gt;com.glide.communications.GlideScriptableInputStream@74f0306d
*** Script: AttachmentStreamExists
*** Script: []&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 00:08:01 GMT</pubDate>
      <guid>https://www.servicenow.com/community/community-central-forum/parse-excel-to-json-format/m-p/3520432#M6584</guid>
      <dc:creator>monikagmk12</dc:creator>
      <dc:date>2026-04-07T00:08:01Z</dc:date>
    </item>
  </channel>
</rss>

