Excel Office Scripts: Combine Excel tables into a master table

Поделиться
HTML-код
  • Опубликовано: 15 окт 2024
  • For source code and input files, check out this link:
    github.com/sum...

Комментарии • 11

  • @Ethan-dd4ln
    @Ethan-dd4ln 3 года назад +1

    Sudhi, thanks for the video! This is very helpful for people especially the people who use Power Automate to combine multiple Excel sheets together.

    • @s65012r
      @s65012r  3 года назад

      For sheets, you could do similar approach. Instead of the table, you can just use sheetVar.getUsedRange().getValues() and then append that. Happy to do another sample if you want.

  • @theCrankyYankee
    @theCrankyYankee Год назад

    Wonderful! How about a script to break a master table out into multiple tables (by name?)? Now that would be sweet!

  • @fritzsierratintaya4911
    @fritzsierratintaya4911 3 года назад +1

    Excelent video!!

  • @nusretmuharrem6418
    @nusretmuharrem6418 3 года назад

    hi Sudhi,
    This is really helpful . there is problem only sheets with huge volume of data like 30k or more lines of rows. script takes long time to finish the run. what can be the best approach in this case? appreciate your assistance in advance.

    • @s65012r
      @s65012r  3 года назад

      Hi Nusret, I made another video to handle writes involving large data. 30k should be easy to handle with this approach I mention in the video = ruclips.net/video/lsR_GvVW3Pg/видео.html
      If you are concerned about 'reading' 30k worth of rows, let me know and I can show some techniques around that too.

    • @nusretmuharrem6418
      @nusretmuharrem6418 3 года назад

      @@s65012r thanks Sudhi. The video is good. but sorry for my less of knowledge. I am really a beginner in coding.
      i have over 10 tables in different excel tabs and actually some of them have huge volume like over 100 & 300 K rows.
      my idea is somehow to make addition to the code that it can take this huge volume step by step such as : 100k rows will be taken in 10 steps which can be faster i guess. I think i have to do some modification in table.getrangebetweenheaderandtotal() part. however i don't know exactly how to. if you can help that would be great. and moreover i wonder next time how code will ignore already taken rows ?
      thanks in advance

    • @s65012r
      @s65012r  3 года назад +1

      @@nusretmuharrem6418, when you say take, do you mean to read them chunks? I don't have a sample for that -- but meaning to provide a sample for large read scenarios. Let me do that and send a link

    • @nusretmuharrem6418
      @nusretmuharrem6418 3 года назад

      @@s65012r take i meant to paste to append sheet in steps. but this was my idea. maybe you have better idea.

    • @s65012r
      @s65012r  3 года назад +1

      If you are simply moving around data from one region to another then using native copy works best. However, if you have to read and do some processing and then apply the changes back then you'll need some to process that in batches.
      Below API copies E7:F11 range data to another location staring at E21. The source and target ranges can be anywhere in the workbook.
      selectedSheet.getRange("E21")
      .copyFrom(selectedSheet.getRange("E7:F11"), ExcelScript.RangeCopyType.all, false, false);
      Can you confirm which of the following you are seeking help on?
      1. Need to copy or move data (as-is) from one (or many) locations to a single sheet/table?
      2. Need to process data first (such as adding additional columns or computation, etc.) and then save it to a single sheet/table?