We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Excel Output Formatting

curious_analyst1
5 - Atom

Hi, I am using Alteryx Designer x64 version 2023.2.1.7 Desktop. I can't post the workflow due to privacy concerns. I have a workflow where I have an .xlsx output that appends a row of data to the end of an existing .xlsx spreadsheet (screenshot # 1). I am trying to make the workflow and process automated where I would not have to go into the Excel spreadsheet each week and change the formatting for the new week's data for 34 columns to $, %, commas, etc. manually. So, I added a formula tool that does all the formatting in the workflow (screenshot # 3). I then have a Select tool of which the data types are 'V_WString' (screenshot # 4). The purpose is for the output to email to the necessary individuals directly as opposed to manually emailing it. The issue I am encountering is that the appended row of data does not match thee existing file formatting (screenshot attached with the new row output appended to the existing data). When I hover over the new appended row cells in the .xlsx appended output it says "the number in this cell is formatted as text or preceded as an apostrophe." I then tried changing the data types in the Select tool before the output tool from 'V_WString' to numeric (Int, double, etc.) but that changed the formatting to remove the $, %, and commas, etc. which I need. Note, when I change the output to a CSV the formatting is exactly what I need but the issue is that I lose all the column header colors as well as the ability to continue to include 2 worksheets in one Excel report. I have also tried using the Table tool and Render tool to align the data to the right Right but there was no option to Append to an existing file and it ended up overwriting the existing file and only returning the new row of data in the output .xlsx file so I scrapped that route. Any help would be appreciated. Thank you. 

1 REPLY 1
KGT
13 - Pulsar

I don't really do this type of operation but understand the issue you are facing. (Can't view the screenshots as they are stuck on virus scan)

 

The data in excel is currency format, which is a display format, not the actual data. So, one of the existing cells in the sheet may have the data 24.65, but that is represented as $24.65. If you are outputting them as Strings, then they will be added as "General" in the Number display, but they are strings underneath and excel is saying "These are a number, can I convert them".

 

The solution is not necessarily to output exactly as you want displayed, but as Excel is doing the display for the rest of the data, you want this data to be included. Outputting to a named range will be the easiest way, that way the Excel sheet can already have the formatting and then just take the numerical data. Take a look on the community for outputting to an Excel range and see if that helps. I'm sure there are many examples on the community that can explain it better than I can for the implementation (as I don't do it often).

Labels
Top Solution Authors