The column headers you have given appear to be from a GST (Goods and Services Tax) return filing data, likely from India's GST returns like GSTR-3B or GSTR-1 / GSTR-9, etc. Below, I'll interpret the likely standardized names or descriptions of these columns as per GST terminology that taxpayers and professionals use.
Interpretation / Meaning of the Columns as per GST terminology:
Column Name
Description / GST Terminology
GSTIN
GST Identification Number (Taxpayer's unique GST number)
Return Period
Tax period (month/year) for which the return is filed
Outward Supplies (Sales) Details:
Column Name
Description
osup_det_txval
Outward supplies taxable value (excluding zero rated/exempt sales)
osup_det_iamt
Integrated Tax on outward supplies
osup_det_camt
Central GST on outward supplies
osup_det_samt
State GST on outward supplies
osup_det_csamt
Cess on outward supplies
osup_zero_txval
Zero rated supplies taxable value
osup_zero_iamt
IGST on zero rated supplies
osup_zero_camt
CGST on zero rated supplies
osup_zero_samt
SGST on zero rated supplies
osup_zero_csamt
Cess on zero rated supplies
osup_nil_exmp_txval
Nil rated or exempt supplies taxable value
osup_nil_exmp_iamt
IGST on nil/exempt supplies
osup_nil_exmp_camt
CGST on nil/exempt supplies
osup_nil_exmp_samt
SGST on nil/exempt supplies
osup_nil_exmp_csamt
Cess on nil/exempt supplies
Reversed Outward Supplies:
Column Name
Description
isup_rev_txval
Reversed outward supplies taxable value
isup_rev_iamt
IGST reversed externally
isup_rev_camt
CGST reversed externally
isup_rev_samt
SGST reversed externally
isup_rev_csamt
Cess reversed externally
Non-GST Outward Supplies:
Column Name
Description
osup_nongst_txval
Outward supply of goods/services not liable to GST
osup_nongst_iamt
IGST on non-GST outward supplies (usually zero/null)
osup_nongst_camt
CGST on non-GST outward supplies
osup_nongst_samt
SGST on non-GST outward supplies
osup_nongst_csamt
Cess on non-GST outward supplies
Input Tax Credit (ITC) Available (By Source):
Column Name
Description
itc_avl_IMPG_iamt
ITC available on imported goods (IGST portion)
itc_avl_IMPG_camt
ITC available on imported goods (CGST portion)
itc_avl_IMPG_samt
ITC available on imported goods (SGST portion)
itc_avl_IMPG_csamt
ITC available on imported goods (Cess portion)
itc_avl_ISRC_iamt
ITC available on inward supplies from registered taxpayers (IGST)
itc_avl_ISRC_camt
ITC available on inward supplies from registered taxpayers (CGST)
itc_avl_ISRC_samt
ITC available on inward supplies from registered taxpayers (SGST)
itc_avl_ISRC_csamt
ITC available on inward supplies from registered taxpayers (Cess)
itc_avl_OTH_iamt
ITC available on other inputs (IGST)
itc_avl_OTH_camt
ITC available on other inputs (CGST)
itc_avl_OTH_samt
ITC available on other inputs (SGST)
itc_avl_OTH_csamt
ITC available on other inputs (Cess)
itc_avl_ISD_iamt
ITC available from Input Service Distributor (IGST)
itc_avl_ISD_camt
ITC available from ISD (CGST)
itc_avl_ISD_samt
ITC available from ISD (SGST)
itc_avl_ISD_csamt
ITC available from ISD (Cess)
itc_avl_IMPS_iamt
ITC available on inward supplies from IS (IGST)
itc_avl_IMPS_camt
ITC available on inward supplies from IS (CGST)
itc_avl_IMPS_samt
ITC available on inward supplies from IS (SGST)
itc_avl_IMPS_csamt
ITC available on inward supplies from IS (Cess)
Reversed ITC (ITC Reversed):
Column Name
Description
itc_rev_RUL_iamt
ITC reversed as per rules (IGST portion)
itc_rev_RUL_camt
ITC reversed as per rules (CGST)
itc_rev_RUL_samt
ITC reversed as per rules (SGST)
itc_rev_RUL_csamt
ITC reversed as per rules (Cess)
itc_rev_OTH_iamt
ITC reversed other than rules (IGST)
itc_rev_OTH_camt
ITC reversed other than rules (CGST)
itc_rev_OTH_samt
ITC reversed other than rules (SGST)
itc_rev_OTH_csamt
ITC reversed other than rules (Cess)
Net ITC Available (After Reversal):
Column Name
Description
itc_net_iamt
Net ITC available (IGST) after reversal
itc_net_camt
Net ITC available (CGST) after reversal
itc_net_samt
Net ITC available (SGST) after reversal
itc_net_csamt
Net ITC available (Cess) after reversal
Ineligible ITC:
Column Name
Description
itc_inelg_RUL_iamt
ITC ineligible as per rules (IGST)
itc_inelg_RUL_camt
ITC ineligible as per rules (CGST)
itc_inelg_RUL_samt
ITC ineligible as per rules (SGST)
itc_inelg_RUL_csamt
ITC ineligible as per rules (Cess)
itc_inelg_OTH_iamt
ITC ineligible other reasons (IGST)
itc_inelg_OTH_camt
ITC ineligible other reasons (CGST)
itc_inelg_OTH_samt
ITC ineligible other reasons (SGST)
itc_inelg_OTH_csamt
ITC ineligible other reasons (Cess)
Interest:
Column Name
Description
intr_iamt
Interest amount (IGST)
intr_camt
Interest amount (CGST)
intr_samt
Interest amount (SGST)
intr_csamt
Interest amount (Cess)
Late Fees:
Column Name
Description
ltfee_iamt
Late fee (IGST)
ltfee_camt
Late fee (CGST)
ltfee_samt
Late fee (SGST)
ltfee_csamt
Late fee (Cess)
Total Tax Liability and Payments:
Column Name
Description
tt_pay
Total tax payable
tt_csh_pd
Total cash paid
tt_itc_pd
Total ITC utilized
Unknown q1 to q7 (possibly system fields or internal codes)
| q1, q2, q3, q4, q5, q6, q7 | Various internal indicators or calculated fields |
Cash Balance of Tax Components:
Column Name
Description
cash_bal_igst_tx
Cash balance IGST tax
cash_bal_igst_intr
Cash balance IGST interest
cash_bal_igst_pen
Cash balance IGST penalty
cash_bal_igst_fee
Cash balance IGST fee
cash_bal_igst_oth
Cash balance IGST others
cash_bal_cgst_tx
Cash balance CGST tax
cash_bal_cgst_intr
Cash balance CGST interest
cash_bal_cgst_pen
Cash balance CGST penalty
cash_bal_cgst_fee
Cash balance CGST fee
cash_bal_cgst_oth
Cash balance CGST others
cash_bal_sgst_tx
Cash balance SGST tax
cash_bal_sgst_intr
Cash balance SGST interest
cash_bal_sgst_pen
Cash balance SGST penalty
cash_bal_sgst_fee
Cash balance SGST fee
cash_bal_sgst_oth
Cash balance SGST others
cash_bal_cess_tx
Cash balance cess tax
cash_bal_cess_intr
Cash balance cess interest
cash_bal_cess_pen
Cash balance cess penalty
cash_bal_cess_fee
Cash balance cess fee
cash_bal_cess_oth
Cash balance cess others
Total Balance of Tax Components:
Column Name
Description
igst_tot_bal
Total balance IGST
cgst_tot_bal
Total balance CGST
sgst_tot_bal
Total balance SGST
cess_tot_bal
Total balance cess
ITC Balances:
Column Name
Description
itc_bal_igst_bal
ITC balance IGST
itc_bal_cgst_bal
ITC balance CGST
itc_bal_sgst_bal
ITC balance SGST
itc_bal_cess_bal
ITC balance Cess
Status:
Column Name
Description
status
Filing status (e.g., filed, pending, rejected)
Tax Payment Details by Tax Type & Components:
Column Name
Description
tax_pay_igst_tx
Tax paid IGST (tax)
tax_pay_igst_intr
Tax paid IGST (interest)
tax_pay_igst_pen
Tax paid IGST (penalty)
tax_pay_igst_fee
Tax paid IGST (fee)
tax_pay_igst_oth
Tax paid IGST (others)
tax_pay_igst_tot
Total tax paid IGST
tax_pay_sgst_tx
Tax paid SGST (tax)
tax_pay_sgst_intr
Tax paid SGST (interest)
tax_pay_sgst_pen
Tax paid SGST (penalty)
tax_pay_sgst_fee
Tax paid SGST (fee)
tax_pay_sgst_oth
Tax paid SGST (others)
tax_pay_sgst_tot
Total tax paid SGST
tax_pay_cgst_tx
Tax paid CGST (tax)
tax_pay_cgst_intr
Tax paid CGST (interest)
tax_pay_cgst_pen
Tax paid CGST (penalty)
tax_pay_cgst_fee
Tax paid CGST (fee)
tax_pay_cgst_oth
Tax paid CGST (others)
tax_pay_cgst_tot
Total tax paid CGST
tax_pay_cess_tx
Tax paid Cess (tax)
tax_pay_cess_intr
Tax paid Cess (interest)
tax_pay_cess_pen
Tax paid Cess (penalty)
tax_pay_cess_fee
Tax paid Cess (fee)
tax_pay_cess_oth
Tax paid Cess (others)
tax_pay_cess_tot
Total tax paid Cess
Tax Payment Transaction Details:
Column Name
Description
tax_pay_liab_id
Tax payment liability ID
tax_pay_trancd
Tax payment transaction code
tax_pay_trandate
Tax payment transaction date
Tax Paid by ITC Details:
Column Name
Description
tax_paid_pd_by_itc_debit_id
Debit ledger ID from which ITC utilized to pay tax
tax_paid_pd_by_itc_liab_id
Liability ledger ID for ITC utilization
tax_paid_pd_by_itc_igst_igst_amt
IGST paid by utilizing IGST ITC
tax_paid_pd_by_itc_igst_cgst_amt
IGST paid by utilizing CGST ITC
tax_paid_pd_by_itc_igst_sgst_amt
IGST paid by utilizing SGST ITC
tax_paid_pd_by_itc_sgst_sgst_amt
SGST paid by utilizing SGST ITC
tax_paid_pd_by_itc_sgst_igst_amt
SGST paid by utilizing IGST ITC
tax_paid_pd_by_itc_cgst_cgst_amt
CGST paid by utilizing CGST ITC
tax_paid_pd_by_itc_cgst_igst_amt
CGST paid by utilizing IGST ITC
tax_paid_pd_by_itc_cess_cess_amt
Cess paid by utilizing Cess ITC
tax_paid_pd_by_itc_trancd
ITC utilization transaction code
tax_paid_pd_by_itc_trandate
ITC utilization transaction date
If you want specific GST form mappings (such as GSTR-1, GSTR-3B, or GSTR-9) to this column list, please specify. The above interpretation is based on standardized GST terms widely used across GST filing systems.
Let me know if you want me to help with the exact field names as per a specific GST return.
Continuing from where you left off... Here's how you can generate the preview rows for your GST data and complete your generateExcelPreview function along with useful helper functions.
Key points:
Your JSON files appear to contain GST return data objects.
For preview, we show limited rows (say max 10) and columns matching previewHeaders.
We'll extract corresponding fields from your loaded JSON objects.
After preview generation, user can export full data using your export buttons.
js
function generateExcelPreview() {
excelPreviewGrid.innerHTML = '';
if (filesData.length === 0) return;
// Headers for preview grid - key columns mapped to your GST data structure
const previewHeaders = [
'GSTIN', 'Return Period', 'Taxable Value', 'IGST', 'CGST', 'SGST', 'Cess'
];
// Map header to JSON object keys (example keys, adjust if needed)
const headerToFieldMap = {
'GSTIN': 'GSTIN',
'Return Period': 'Return Period',
'Taxable Value': 'osup_det_txval', // Outward taxable value
'IGST': 'osup_det_iamt', // IGST amount on outward supplies
'CGST': 'osup_det_camt', // CGST amount on outward supplies
'SGST': 'osup_det_samt', // SGST amount on outward supplies
'Cess': 'osup_det_csamt' // CESS amount on outward supplies
};
// Apply header style formatting options
const headerBold = document.getElementById('header-bold').checked;
const headerBackground = document.getElementById('header-background').checked;
// Add headers
previewHeaders.forEach(header => {
const headerCell = document.createElement('div');
headerCell.className = 'excel-header';
headerCell.textContent = header;
// Apply formatting options to headers
if (headerBold) headerCell.style.fontWeight = '700';
if (headerBackground) headerCell.style.backgroundColor = '#dbe4f0'; // Light blue background
excelPreviewGrid.appendChild(headerCell);
});
// Flatten data rows from all files (you can customize how to combine multiple files)
// For now, merge all filesData arrays together (assuming each is a GST return JSON object)
// If filesData[i] is an array of records, adjust accordingly to flatten
// Here, assuming each filesData item is an object; we create an array of these objects.
let previewRows = [];
filesData.forEach(data => {
// If your file data is an array, flatten it
if (Array.isArray(data)) {
previewRows = previewRows.concat(data);
} else if (typeof data === 'object' && data !== null) {
previewRows.push(data);
}
});
// Limit preview to max 10 rows for performance & clarity
const maxPreviewRows = 10;
const rowsToShow = previewRows.slice(0, maxPreviewRows);
// Data formatting options
const formatNumbers = document.getElementById('format-numbers').checked;
const highlightZeros = document.getElementById('highlight-zeros').checked;
const highlightNegatives = document.getElementById('highlight-negatives').checked;
// Add rows
rowsToShow.forEach(rowData => {
previewHeaders.forEach(header => {
const cell = document.createElement('div');
cell.className = 'excel-cell';
// Extract value based on mapped field
let val = rowData[headerToFieldMap[header]];
// Formatting for numbers: format as Indian currency or plain number with commas
if (typeof val === 'number' && formatNumbers) {
val = formatCurrency(val);
} else if (val === null || val === undefined) {
val = '';
}
cell.textContent = val;
// Conditional formatting
if (highlightZeros && (val === 0 || val === '0')) {
cell.style.backgroundColor = '#fff3cd'; // light yellow
}
if (highlightNegatives && typeof rowData[headerToFieldMap[header]] === 'number' && rowData[headerToFieldMap[header]] < 0) {
cell.style.backgroundColor = '#f8d7da'; // light red
}
excelPreviewGrid.appendChild(cell);
});
});
}
// Helper: Format number to Indian currency style or just with commas
function formatCurrency(num) {
if (typeof num !== 'number') return num;
// Example: format with commas for thousands
// You can improve for currency symbol etc.
return num.toLocaleString('en-IN', { maximumFractionDigits: 2 });
}
Further Notes:
Make sure your actual JSON files have the expected keys (e.g., osup_det_txval, GSTIN etc.).
If the file data structure is more complex (e.g., nested arrays or objects), you'll have to parse/extract accordingly.
For larger datasets consider pagination or virtualization when showing preview.
If you want, I can also help you implement the export functionality (Excel, CSV, PDF) using libraries like SheetJS (xlsx) for Excel/CSV and jsPDF or pdfmake for PDF export.