Reading Imported excel data from FlexGird

Originally Posted 1 August 2016, 11:44 am EST

  • Originally Posted 1 August 2016, 11:44 am EST

    Hi Team,
    I was trying to validate the imported excel whether it matches with my existing grid in the UI, but couldn't find any specific method that does that. Is there any way we can do a validation, column or row level. Please let me know.
    I used wijmo.grid.xlsx.FlexGridXlsxConverter.load to import the excel file, but couldn't validate the itemSource or data.

    Thank you
    Manu
  • Reply

    Hello,

    Unfortunately, we are not able to understand your query, could you please elaborate your query further describing what type of validation are you looking forward to do in FlexGrid after importing the Excel file. Please provide us with some examples or screenshots depicting your requirement so that we can accordingly guide you ahead with this issue.

    Thanks,
    Manpreet Kaur
  • Reply

    Hi Manpreet,
    I have a flexgrid with columns [Name, Email, Location]. I have implemented import excel feature to this table, my question is how can I validate the excel which I imported, has same columns as my flexgrid. Excel sheet may contain different columns which I don't need in the flex grid.
    Hope I'm clear.

    Thank you
    Manu
  • Reply

    Hi,
    Thanks for sharing your requirement with us. You can accomplish this task with workbook class of wijmo.xlsx module.
    Kindly refer to the fiddle http://jsfiddle.net/mkgupta911/bqc6c7od/ which depicts the same.
    Hope it helps.

    Thanks ,
    Manish Kumar Gupta
  • Reply

    Thank you Manish.

    One quick question -
    After import statement, myGrid.itemsSource.sourceCollection still shows the old data, not the imported data.
    Actually I want to append to the existing grid data, any thought on this? please let me know.

    wijmo.grid.xlsx.FlexGridXlsxConverter.load(myGrid, result, { includeColumnHeaders: true });
    console.log("New Data -", myGrid.itemsSource.sourceCollection);

    Thank you
    Manu
  • Marked as Answer

    Reply

    Hello Manu,
    This issue has been already discussed at following forum link :
    http://wijmo.com/topic/collectionview-not-getting-updated-after-importing-data-to-the-grid-from-excel/
    Hope it helps.

    Thanks,
    Manish Kumar Gupta
  • Reply

    Hola Manish,
    el enlace arriba mencionado ya no existe y tengo la misma duda que mac4manu. Si pudieras responder a la pregunta seria de gran utilidad ya que no encuentro nada.

    Hi, Manish,
    the above mentioned link no longer exists and I have the same doubt as mac4manu. If you could answer the question it would be very useful since I can't find anything.
  • Reply

    Hi Clara,

    After importing a file to excel, the CollectionView or the itemsSource is not updated and the FlexGrid runs in unbound mode. So, you will need to create the CollectionView manually. Please refer to the sample link below that demonstrates this behavior:

    https://stackblitz.com/edit/angular-v5oimq

    Regards,
    Ashwin
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels