LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting data in excel from user specified cell

Hi Felipevv

        Thanks for the reply. I worked on it and got a solution, few interlocks was giving me a headache that are finally fixed.

Please find the attached code.


0 Kudos
Message 11 of 21
(1,548 Views)

Hi temin,

                You have to mark Felipew's post as the accepted solution and not yours.

                Thank you.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 12 of 21
(1,541 Views)

I fing the best way is to create a range with the first cell and then resize that range with the Range.Resize method with the input as the size of the array you want to write.  See attached vi.  Btw the attached vi also reads from a spreadsheet given the start cell and size of the array.

 

Ken

0 Kudos
Message 13 of 21
(1,527 Views)

Hi Ken

          Thanks for the reply. Can you post the two sub VIs that this VI uses. This code looks beautiful.Smiley Surprised

0 Kudos
Message 14 of 21
(1,516 Views)

Sorry forgot about the 'housekeeping' vis see attached

Code-Decode Cell reference converts Row-column to 'A1' cell notation and vice versa

Convert to variant converts the string array to a variant as strings or as double (specific to a particular solution not general so you could insert your own vi here The writing to the range required a variant datatype.)

 

enjoy

 

Ken

Download All
0 Kudos
Message 15 of 21
(1,513 Views)

Can you upload the VI for Labview 2009?

I would like to see a more efficient code
.

 

Thanks.

0 Kudos
Message 16 of 21
(1,503 Views)

For LabVIEW 9.0 as requested

 

Ken

Message 17 of 21
(1,497 Views)

Hi Ken

 

Thanks for your reply.

   

In your logic if Cell Reference is something like AA, it will not work. The logic will hold good if the cell reference column is from A-Z.

 

In this case I feel my code is more generic since it will work even if start of cell is AA or AAA.

 

Thanks for the code.

 

Regards

Temin

 

0 Kudos
Message 18 of 21
(1,488 Views)

I disagree - Which bit of the code does not work with cell references begining AA.  I have tested Code-Decode Cell Reference.vi up to the limit of my Excel (2003) and it works fine.  See screen capture

 

Ken

0 Kudos
Message 19 of 21
(1,480 Views)

Hi Ken

     please check below the screenshots of your code.

 

Regards

Temin

Download All
0 Kudos
Message 20 of 21
(1,476 Views)