Converts a CSV you upload or link to into a real .xlsx workbook and emails it to you as an attachment.

UsesCloudConvertGmail

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.

Set csvSource to blank.Set csvSource to blank.
Set excelFileName to blank.Set excelFileName to blank.
Set sendTo to blank.Set sendTo to blank.
Trim csvSource and save it as source.Trim csvSource and save it as source.
If 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…
Yes
Stop and report a problem: The 'csvSource' step needs either a CSV uploaded onto the step itself or an https link that downloads one. What it has is neither, so nothing was converted.Stop and report a problem: The 'csvSource' step needs either a CSV uploaded onto the step itself or an https link that downloads one. What it has is neither, so nothing was converted.
No
No steps
Trim excelFileName and save it as fileName.Trim excelFileName and save it as fileName.
If fileName doesn't end with “.xlsx” (ignoring case)If fileName doesn't end with “.xlsx” (ignoring case)
Yes
Change fileName to “@fileName.xlsx”.Change fileName to “@fileName.xlsx”.
No
No steps
Set converted to blank.Set converted to blank.
Set problem to blank.Set problem to blank.
If a step below fails, save the error as convertErrorIf a step below fails, save the error as convertError
Try
CloudConvertCloudConvertConvert a file to xlsx. Save it as converted.Convert a file to xlsx. Save it as converted.
On error
Trim convertError.message and save it as rawReason.Trim convertError.message and save it as rawReason.
Replace 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.
If safeReason contains “://”If safeReason contains “://”
Yes
Change problem to “the file could not be converted”.Change problem to “the file could not be converted”.
No
Change problem to safeReason.Change problem to safeReason.
If problem isn't emptyIf problem isn't empty
Yes
Stop and report a problem: The CSV could not be turned into an Excel workbook, so nothing was emailed: problem.Stop and report a problem: The CSV could not be turned into an Excel workbook, so nothing was emailed: problem.
No
No steps
TextMake converted.output_format lowercase and save it as gotFormat.Make converted.output_format lowercase and save it as gotFormat.
Set gotSize to converted.size_bytes multiplied by 1.Set gotSize to converted.size_bytes multiplied by 1.
Trim converted.document_ref and save it as workbookRef.Trim converted.document_ref and save it as workbookRef.
If gotFormat is not “xlsx”If gotFormat is not “xlsx”
Yes
Stop and report a problem: The converter sent back something other than an Excel workbook, so nothing was emailed. It came back as: gotFormat.Stop and report a problem: The converter sent back something other than an Excel workbook, so nothing was emailed. It came back as: gotFormat.
No
No steps
If gotSize is less than 1If gotSize is less than 1
Yes
Stop and report a problem: The workbook came back empty, so nothing was emailed. Check that the CSV has rows in it and run it again.Stop and report a problem: The workbook came back empty, so nothing was emailed. Check that the CSV has rows in it and run it again.
No
No steps
If workbookRef doesn't start with “doc_”If workbookRef doesn't start with “doc_”
Yes
Stop and report a problem: The workbook was not saved, so there was nothing to attach and nothing was emailed. Run it again.Stop and report a problem: The workbook was not saved, so there was nothing to attach and nothing was emailed. Run it again.
No
No steps
GmailGmailSend an email to 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.
Show in the output: Emailed fileName.Show in the output: Emailed fileName.