Converts a CSV you upload or link to into a real .xlsx workbook and emails it to you as an attachment.
Uses
CloudConvert
Gmail
Turn a CSV into an Excel file
Give it a CSV, either uploaded or as a link that downloads one, and run it. The file is converted into a real Excel workbook and emailed to you as an attachment, named as you asked, ready to open in Excel, Numbers or Sheets.
You end up with the same data in a different format and nothing more. Every value is carried across as it was written: no AI reads the file, and nothing is rounded, relabelled, reordered or left out. Because values are untouched, a cell that begins with an equals sign may be read by Excel as a formula when the file is opened. Nothing is emailed unless a real workbook came back: if the conversion fails, returns a different format or produces an empty file, the run stops and says which, so you never get a message claiming an attachment that is not there. A failure is reported with its reason but never with the address of your file, since a download link often carries the token that makes it work.
csvSource to blank.Set csvSource to blank.excelFileName to blank.Set excelFileName to blank.sendTo to blank.Set sendTo to blank.csvSource and save it as source.Trim csvSource and save it as source.source in lowercase doesn't start with doc_ and source in lowercase doesn't…If source in lowercase doesn't start with doc_ and source in lowercase doesn't…excelFileName and save it as fileName.Trim excelFileName and save it as fileName.fileName doesn't end with .xlsx (ignoring case)If fileName doesn't end with .xlsx (ignoring case)fileName to fileName.xlsx.Change fileName to fileName.xlsx.converted to blank.Set converted to blank.problem to blank.Set problem to blank.convertErrorIf a step below fails, save the error as convertErrorconverted.Convert a file to xlsx. Save it as converted.convertError.message and save it as rawReason.Trim convertError.message and save it as rawReason.source with the file you gave it in rawReason and save it as safeReason.Replace source with the file you gave it in rawReason and save it as safeReason.safeReason contains ://If safeReason contains ://problem to the file could not be converted.Change problem to the file could not be converted.problem to safeReason.Change problem to safeReason.problem isn't emptyIf problem isn't emptyproblem.Stop and report a problem: The CSV could not be turned into an Excel workbook, so nothing was emailed: problem.converted.output_format lowercase and save it as gotFormat.Make converted.output_format lowercase and save it as gotFormat.gotSize to converted.size_bytes multiplied by 1.Set gotSize to converted.size_bytes multiplied by 1.converted.document_ref and save it as workbookRef.Trim converted.document_ref and save it as workbookRef.gotFormat is not xlsxIf gotFormat is not xlsxgotFormat.Stop and report a problem: The converter sent back something other than an Excel workbook, so nothing was emailed. It came back as: gotFormat.gotSize is less than 1If gotSize is less than 1workbookRef doesn't start with doc_If workbookRef doesn't start with doc_sendTo.Send an email to sendTo.
Subject: fileNameAttached is fileName, converted from the CSV set up in this workflow's 'csvSource' step. Every value was carried across as it was written - nothing was rounded, relabelled or left out.fileName.Show in the output: Emailed fileName.