Hi,
Am following this link for spreadsheet
https://ko.infragistics.com/products/ignite-ui-angular/angular/components/spreadsheet-configuring
when we click on particular row and apply filter it gives excel style filtering. now clicking on that filter it opens up the modal windows showing different events
i have couple of questions
1. can we configure this window to open on left or right side of cell(am showing spreadsheet in the pop up and that modal window is partially hiding for the first column)
2. when i click on sorting it is not doing any thing even in the example provided
3. when we click on filter can we get unique values for that column as in excel
i tried
Thanks this might help in our requirement. one last question regarding style. can you share some example how i can initialize the style
Hello Peru,
I have been investigating into your most recent requirements in this case, and I have some information for you.
Regarding setting a particular row as the header row of the table in a Worksheet, this will by default be the first row in the region that you define. If there is no data in the first row of the region you define, which is the case with the Worksheet you provided with the “A1:C11” region, this will generate default column headers, which I believe is the behavior you are seeing. If you wanted row 3 to be the header, you would need to ensure that is the first row in the region (“A3:C11”).
Regarding dynamically calculating and setting the region, I would recommend utilizing the following code, as this should help you, assuming you want the entirety of the data region to be part of the table:
let sheet = this.spreadsheet.activeWorksheet; let startCell: WorksheetCell; let endCell: WorksheetCell; let rows = sheet.rows(); for (let row of rows) { let cells = row.cells(); for (let cell of cells) { if(cell.value != null){ if(startCell == null){ startCell = cell; } endCell = cell; } } } sheet.workbook.cellReferenceMode = CellReferenceMode.R1C1; let address = "R" + (startCell.rowIndex + 1) + "C" + (startCell.columnIndex + 1) + ":R" + (endCell.rowIndex + 1) + "C" + (endCell.columnIndex + 1); sheet.tables().add(address, true);
The loop in that code may make you believe that you will be looping through all possible rows and columns in the Worksheet, but this is not the case – the Worksheet only registers the cells and rows that have been modified in some way. For example, in the case of your Worksheet, I am seeing some null-value cells, which leads me to believe that they had been modified in some way prior to saving the file.
Regarding “hasHeaderRow” not existing on the WorksheetTable, you are correct – this does not exist, but the table does have an isHeaderRowVisible property that you can set to prevent the headers from being visible.
Regarding documentation for styling the tables, unfortunately it does not appear that we have this in our Angular documentation at the time of writing this. I will be investigating into getting this written or enabled, as this should be there. In the meantime, it is worth noting that the Excel Library that the IgxSpreadsheet hinges on is the same API across all of our platforms, and so a similar documentation topic exists here: https://ko.infragistics.com/help/wpf/excelengine-support-named-tables-in-an-excel-spreadsheet#_Ref320528495. I am aware that this is for our WPF product and not Angular, but the information provided there should work the same as in the Ignite UI for Angular product’s Excel Library.
Please let me know if you have any other questions or concerns on this matter.
one more thing i noticed in the solution is after i delete the first 2 rows automatically infragtics add Column 1 , column2 etc as first name may be because am setting true
hasHeaderRow doesnot exist on the Worksheettable
instead can i set the existing first row itself as header so that the row is not sorted
Hey, thanks for the clarification and documentation reference. this is what am trying to achieve from the excel sheet i have attached
delete the first 2 empty rows
for this am converting the worksheet as table for certain random rows/columns in this case
this.spreadsheet.workbook.worksheets(0).tables().add("A1:Z1000", true);
** i noticed other way i can hide those columns without converting this as table
i have 2 questions when converting the worksheet data as table
1. is it possible to define a header row in that excel for instance row 3 or row 1 after deleting first 2 rows
2. instead of hardcoding "A1:Z1000" for table is there way i can dynamically decide based on the excel data ?
3. Also documentation for style so i can make the cell borders bold etc
2768.sample sort.xlsx