How to export google sheet as CSV by selected columns

后端 未结 1 1355
旧巷少年郎
旧巷少年郎 2021-01-15 12:21

I have a Google sheet want to export as CSV file. But there are 2 columns in the sheet I don\'t want to export. For example, in the picturecolumn, I don\'t want to export co

相关标签:
1条回答
  • 2021-01-15 13:20

    How about this modification?

    Modification points :

    • Modify convertRangeToCsvFile_().
      • From data retrieved by getValues(), it removes the columns "N" and "P".

    In order to reflect this, please modify as follows.

    From :

    var data = activeRange.getValues();
    var csvFile = undefined;
    

    To :

    var data = activeRange.getValues();
    data = data.map(function(e){return e.filter(function(_, i){return i != 13 && i != 15})}); // Added
    var csvFile = undefined;
    

    If I misunderstand your question, please tell me. I would like to modify it.

    0 讨论(0)
提交回复
热议问题