LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel file to text in hex format 16 places per row

Solved!
Go to solution

Hi R,

 


@RHutchings wrote:
I started, but something has changed on the website and I need to get used to the new format. That said. I have these numbers in Excel, let's just say 60 40 0 60 0 0 40 60 40 0 60 0 0 40 60 40 0 60 0 0 40 60 40 0 60 0 0 40 60 40 0 60 0 0 40. I want them to be like this. 60 40 00 60 00 00 40 60 40 00 60 00 00 40 60 40 00 60 00 00 40 60 40 00 60 00 00 40 60 40 00 60 00 00 40

Just set the cell format to "00" in Excel, so it will show numbers using two digits with leading zeros...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 20
(613 Views)

@GerdW wrote:

Just set the cell format to "00" in Excel, so it will show numbers using two digits with leading zeros...


Yes, if this were an Excel forum, that would be the solution. 😄

 

altenbach_0-1661280301446.png

 

0 Kudos
Message 12 of 20
(602 Views)

Hi Christian,

 


@altenbach wrote:

@GerdW wrote:

Just set the cell format to "00" in Excel, so it will show numbers using two digits with leading zeros...


Yes, if this were an Excel forum, that would be the solution. 😄


Well, the requirement was "Which ever is easier I guess."... 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 20
(598 Views)

@GerdW wrote:

Hi Christian,

 


@altenbach wrote:

@GerdW wrote:

Just set the cell format to "00" in Excel, so it will show numbers using two digits with leading zeros...


Yes, if this were an Excel forum, that would be the solution. 😄


Well, the requirement was "Which ever is easier I guess."... 😄


Well, sparse question are ambiguous and we don't really know the backstory. If (big if!) the data originated in LabVIEW and a LabVIEW program is used to write that malformatted excel file, it would be a detour to even use excel. 😄

0 Kudos
Message 14 of 20
(590 Views)
That got me part way there, thank you. Now to arrange them into 16 columns.
0 Kudos
Message 15 of 20
(578 Views)

@RHutchings wrote:
That got me part way there, thank you. Now to arrange them into 16 columns.

What was "that" that got you part way there? (I recommend to quote relevant section of the post you are replying to as I just did above!)

 

I already showed you how to reshape the data into 16 columns. Have you tried?

 

This will fill rows first. If you want to fill columns first, a little bit mode code is needed. (e.g. Swap the size inputs to "reshape array" and transpose afterwards)

 

(I am not sure if there is an easy solution within excel. Never use it. 😉 )

0 Kudos
Message 16 of 20
(574 Views)
Sorry, no I didn't see that. Now we're getting somewhere.
0 Kudos
Message 17 of 20
(563 Views)
What are the vis you are using?
0 Kudos
Message 18 of 20
(554 Views)
Solution
Accepted by topic author RHutchings
  1. spreadsheet string to array (type=1D U8 array, format=%d, delimiter <space>)
  2. array size, quotient&remainder, sign, add, I32 diagram constant of "16"
  3. reshape array
  4. spreadsheet string to array
0 Kudos
Message 19 of 20
(550 Views)

In the end none of this was used but I did learn a bit from all the posts. 

0 Kudos
Message 20 of 20
(493 Views)