community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Write a specific value to a specific cell in a specific sheet in excel

Alteryx Certified Partner

Having an issue that I shouldn't be having but can't seem to get the output functioning correct.

 

 

I need to write a specific value to a specific cell in a specific sheet in a specific workbook.

 

Workbook: Workbook_Alpha

Sheet: RAW_DATA

Cell: Z2

Value: 1

 

Initially the worksheet would be populated for columsn A:G and then a conditional runner would create the value of '1' in Z2 which would be used as a trigger for a VBA code that runs on workbook opening.  The text is generated via a text input tool at the beginning of the conditional workflow.

 

This is probably simple but can't seem to get anything working.

 

Output Location Attempted:  C:\Users\***\Desktop\excel testing\Workbook_Alpha.xlsm|||'RAW_DATA$Z1:Z2'

Highlighted

@AndrewPoole What sort of errors/issues are you having? I don't see anything wrong on the face of it. The attached v11.0 workflow will write out the data to Z1:Z2 using this relative formula:

.\Workbook_Alpha.xlsm|||`RAW_DATA$Z1:Z2`

You can obviously replace the first part with your full file path.

Alteryx Certified Partner

It says it is loading, zero errors, but no data is appearing in the worksheet.

Quasar

I don't see anything wrong with the path spec you're using. Is it possible the file is still open at the time the write action is processed? If so, judicious use of Block Until Done may help.

 

Failing that, can you share a sample failing workflow and data?

@AndrewPoole So when you save my workflow and try to run it, it creates an XLSM file but there is no data in Z1 and Z2? Here is my experience. I changed the path to C:\Data for the demonstration. If my example works but your file doesn't, by any chance are you writing over the entire sheet/workbook later in your workflow?

Media1.gif

Alteryx Certified Partner

Solved.  It had to do with the data type.  Props to @Patrick_dignan

Alteryx Certified Partner

@patrick_digan  I may have spoken to early.

 

While that does indeed fix the issue the load only occurs when I do a 'drop'.  This would need to append an existing.

 

Runner 1: Loads A:I

Runner 2: Loads Z1:Z2 which triggers an excel macro when opened.

 

Would need to be the RAW_DATA sheet.  

 

Any thoughts?

@AndrewPoole Can you send along any sort of workflow with dummy data or screenshots of your setup/where issues are coming up? Here would be my initial questions in the meantime:

 

1) When you write to A:I, are you specifying those columns in your output tool or are you just specifying the sheet?

2) Which option do you want to output A:I (append, overwrite sheet, overwrite file)?

3) Is your output to A:I currently successful?

4) Is your output to Z1:Z2 currently successful? I assume you're not trying to append existing to this runner. You would want to overwrite the sheet, which would only affect Z1:Z2 and won't actually overwrite the sheet (since you've specified a range it only overwrites the range).

Alteryx Certified Partner

1) When you write to A:I, are you specifying those columns in your output tool or are you just specifying the sheet?

  • They are specified

2) Which option do you want to output A:I (append, overwrite sheet, overwrite file)?

  • Runner 1: Overwrite
  • Runner 2: Append same sheet that was overwritten by Runner 1

3) Is your output to A:I currently successful?

  • 100% success

4) Is your output to Z1:Z2 currently successful?

  • successful as overwrite. Think I might be overthinking this, didn't notice we don't drop the entire sheet if its specified.  Let me try that.

 

 

Alteryx Certified Partner

Hey guys,

When I try to write to one cell on a spreadsheet using Sheet1$D9:D10 it writes the fieldname on D9 and the value into D10.  

Is there a way to just write the value into cell D9?

Labels