@acrewity/n8n-nodes-acrewity 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@ This node provides access to all Acrewity API services:
29
29
  ### File Conversion
30
30
  - **Image Converter** - Convert between JPEG, PNG, WebP, BMP, GIF, ICO, TIFF
31
31
  - **Excel to JSON** - Parse Excel files to JSON
32
- - **JSON to Excel** - Create Excel files from JSON data
32
+ - **JSON to Excel** - Create Excel files from JSON (single or multi-sheet, with cell positioning and formula support)
33
33
 
34
34
  ### PDF Operations
35
35
  - **PDF Merge** - Combine multiple PDF files
@@ -776,15 +776,17 @@ class Acrewity {
776
776
  displayOptions: { show: { resource: ['json_to_excel'] } },
777
777
  options: [
778
778
  { name: 'Create Excel', value: 'create_excel', action: 'Create excel from json' },
779
+ { name: 'Create Multi-Sheet Excel', value: 'create_multi_sheet', action: 'Create excel with multiple sheets' },
779
780
  ],
780
781
  default: 'create_excel',
781
782
  },
783
+ // Single sheet parameters
782
784
  {
783
785
  displayName: 'Data (JSON Array)',
784
786
  name: 'data',
785
787
  type: 'string',
786
788
  typeOptions: { rows: 6 },
787
- displayOptions: { show: { resource: ['json_to_excel'] } },
789
+ displayOptions: { show: { resource: ['json_to_excel'], operation: ['create_excel'] } },
788
790
  default: '[{"Name": "John", "Email": "john@example.com"}]',
789
791
  required: true,
790
792
  description: 'JSON array of objects to convert to Excel',
@@ -793,10 +795,45 @@ class Acrewity {
793
795
  displayName: 'Sheet Name',
794
796
  name: 'sheetName',
795
797
  type: 'string',
796
- displayOptions: { show: { resource: ['json_to_excel'] } },
798
+ displayOptions: { show: { resource: ['json_to_excel'], operation: ['create_excel'] } },
797
799
  default: 'Sheet1',
798
800
  description: 'Name of the Excel sheet',
799
801
  },
802
+ // Multi-sheet parameters
803
+ {
804
+ displayName: 'Sheets (JSON Object)',
805
+ name: 'sheets',
806
+ type: 'string',
807
+ typeOptions: { rows: 10 },
808
+ displayOptions: { show: { resource: ['json_to_excel'], operation: ['create_multi_sheet'] } },
809
+ default: '{\n "Sheet1": [{"Name": "John", "Age": 30}],\n "Sheet2": [{"Product": "A", "Price": 100}]\n}',
810
+ required: true,
811
+ description: 'JSON object with sheet names as keys. Values can be arrays of objects, or output from excel-to-json (detectedTable or cells format)',
812
+ },
813
+ {
814
+ displayName: 'Include Headers',
815
+ name: 'headers',
816
+ type: 'boolean',
817
+ displayOptions: { show: { resource: ['json_to_excel'] } },
818
+ default: true,
819
+ description: 'Whether to include headers row from object keys',
820
+ },
821
+ {
822
+ displayName: 'Use Cells',
823
+ name: 'useCells',
824
+ type: 'boolean',
825
+ displayOptions: { show: { resource: ['json_to_excel'], operation: ['create_multi_sheet'] } },
826
+ default: false,
827
+ description: 'Whether to use raw cell data (preserves exact cell positions). Requires sheets to have "cells" property.',
828
+ },
829
+ {
830
+ displayName: 'Preserve Formulas',
831
+ name: 'preserveFormulas',
832
+ type: 'boolean',
833
+ displayOptions: { show: { resource: ['json_to_excel'], operation: ['create_multi_sheet'], useCells: [true] } },
834
+ default: false,
835
+ description: 'Whether to preserve Excel formulas when using cells mode',
836
+ },
800
837
  // ============ PDF Merge ============
801
838
  {
802
839
  displayName: 'Operation',
@@ -1230,8 +1267,19 @@ class Acrewity {
1230
1267
  }
1231
1268
  // JSON to Excel
1232
1269
  if (resource === 'json_to_excel') {
1233
- parameters.data = JSON.parse(this.getNodeParameter('data', i));
1234
- parameters.sheetName = this.getNodeParameter('sheetName', i);
1270
+ if (operation === 'create_excel') {
1271
+ parameters.data = JSON.parse(this.getNodeParameter('data', i));
1272
+ parameters.sheetName = this.getNodeParameter('sheetName', i);
1273
+ parameters.headers = this.getNodeParameter('headers', i);
1274
+ }
1275
+ if (operation === 'create_multi_sheet') {
1276
+ parameters.sheets = JSON.parse(this.getNodeParameter('sheets', i));
1277
+ parameters.headers = this.getNodeParameter('headers', i);
1278
+ parameters.useCells = this.getNodeParameter('useCells', i);
1279
+ if (parameters.useCells) {
1280
+ parameters.preserveFormulas = this.getNodeParameter('preserveFormulas', i);
1281
+ }
1282
+ }
1235
1283
  }
1236
1284
  // PDF Merge
1237
1285
  if (resource === 'pdf_merge') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrewity/n8n-nodes-acrewity",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "n8n community node for Acrewity API - A unified API platform with 22+ utility services including PDF processing, data conversion, QR codes, barcodes, and more",
5
5
  "license": "MIT",
6
6
  "homepage": "https://acrewity.com",