Hi, Is there a way to read an excel file with spaces in column names

Hi,

Is there a way to read an excel file with spaces in column names (ex: EMPLOYEE NAME) and write to a DB Table? It is known to me that spaces are not accepted in CDT, so is there any other way how I can read these columns with spaces and map it to be written on their respective columns on the DB Table?

Thanks!

OriginalPostID-194503

OriginalPostID-194503

  Discussion posts and replies are publicly visible

  • Hi Sheenajenp,
    The "Read Excel Spreadsheet Utilities" could be useful, please check the link shared below:
    forum.appian.com/.../summary
  • @sheenajenp Hi, 'readExcelColumn' function in the above mentioned plugin should do the work for you when the header names differ from the field names in CDT. The column in the spreadsheet might have any name, but readExcelColumn reads the data based on sheet number.

    Also bear in mind that readExcelColumn reads the first cell in the column, which could be typically the column header. If the first cell in the column is header, make sure that the first row is removed after building the cdt array from the results of parsed columns.

    As far as the plugin implementation is considered, having the header names same as the field names in CDT will help you in keeping the implementation simple and clean as per my knowledge.
  • Having experienced using this recently the key issue is that having a column name that matches the CDT attribute name forces you to have column names that are technical in nature, which isn't very friendly for business facing use. In order to address this, we had to introduce an intermediate step in the spreadsheet to take the business-facing content and generate (using a macro) the technical-facing content. It's not elegant but it works.
  • We utilize the macro method as well, to also get around excel's auto-formatting which has caused issues with columns not matching the CDT data type expected. The marcos write text-only data to a second, hidden sheet, then we ready from that in the parse excel node. Only issue has been occasional user training where they do not Enable Content in the excel file before saving/uploading.