jspreadsheet / pro

Jspreadsheet Pro | The javascript spreadsheet
https://jspreadsheet.com/
15 stars 1 forks source link

Feature request: insert column title instead of cell name when typing a formula #334

Open sh-ravan opened 2 months ago

sh-ravan commented 2 months ago

Please consider implementing a feature that allows us to insert column title instead of cell name when typing a formula.

For example, when clicking on cell A3, instead of seeing 'A3' in the formula editor, we would like to have '@QUANTITY' inserted. So, instead of this, image we'd like to be able to do this. image

Ideally, we want to control the auto-fill behaviour programmatically and ensure that when a column title is used in a formula, any changes to the title are automatically reflected in the formula.

hodeware commented 2 months ago

This is already available using Formula Pro. The autocomplete will be consider in future releases.


// Create spreadsheet
jspreadsheet(document.getElementById('spreadsheet'), {
    worksheets: [{
        data: [
            [ 10, '=@Quantity*10' ],
            [ 20, '=@Quantity*10' ],
            [ 30, '=@Quantity*10' ],
        ],
        columns: [
            { type: 'text', width:'300', title: 'Quantity' },
            { type: 'text', width:'200', title: 'Total' },
        ]
    }],
    columnNamesInFormulas: true,
});
sh-ravan commented 2 months ago

Thanks, I am using the formula pro extension like you mentioned in the snippet. The request is for the autocomplete feature.