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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Read excel function give zeros instead of real values

YA_10963798
12-Amethyst

Read excel function give zeros instead of real values

Hi there

I using (READEXCEL) but it read all the values as zeros 

YA_10963798_0-1729430508634.png

they should be these  values

YA_10963798_1-1729430534960.png

It works with the previous values 

YA_10963798_2-1729430588999.png

thanks in advance

 

 

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:YA_10963798)

Is the Excel worksheet up to date?  You call Sheet 2 in your Mathcad worksheet, but in addition to the lack of Column D, there is no Sheet 2 in "Total Original Location.xlsx".   

 

I modified your Mathcad worksheet to construct the range from the sheet number, column letter and number of lines; I also modified Sheet 1 to include a Column D (scaled copy of Column C).  I didn't see any errors when using Sheet 1 for all valid ranges.  I then changed rang_6 to point to the empty Column E and got a vector of zeros (as expected from an empty column).

 

2024 10 20 D.png

 

Stuart

View solution in original post

7 REPLIES 7
Werner_E
25-Diamond I
(To:YA_10963798)

Missing your Prime file. Hopefully stripped down just showing the reading of the data and the display of the unexpected zeros

Not sure how the pdf you posted should be of any help here.

 

P.S.: Your Excel sheet only contains three columns of data (A,B,C). Hope you did not try to read columns D and E !??

Sorry I attached the wrong sheet 

Werner_E
25-Diamond I
(To:YA_10963798)

There is no sheet2 in the Excel file you posted!

As already written before it contains just one sheet with three columns of data (X,Y,Z values) - nothing more.

So trying to read from the second sheet obviously must fail

Werner_E_0-1729443042068.png

 

I changed that , however it wasn't saved ... range 4 is in the first excel sheet , but I'm getting zeros in mathcad 

YA_10963798_0-1729444826387.png

also in the one below ... it is writen bad sheet what does that mean? 

 

Werner_E
25-Diamond I
(To:YA_10963798)


@YA_10963798 wrote:

I changed that , however it wasn't saved ... range 4 is in the first excel sheet , but I'm getting zeros in mathcad 

 


Haven't you read what I wrote more than 3 hours ago in my first reply and what I repeated in my last one?

Your Excel sheet contains only three columns of X,Y,Z data - nothing more!. There is no CPT data stored in the file. There is neither a second sheet nor a column D, E or F!!!!

Werner_E_0-1729446122189.png

Or better said, of course there actually are column E and F, but they are empty and contain no data. So Mathcad reads zero values there.

 

StuartBruff
23-Emerald III
(To:YA_10963798)

Is the Excel worksheet up to date?  You call Sheet 2 in your Mathcad worksheet, but in addition to the lack of Column D, there is no Sheet 2 in "Total Original Location.xlsx".   

 

I modified your Mathcad worksheet to construct the range from the sheet number, column letter and number of lines; I also modified Sheet 1 to include a Column D (scaled copy of Column C).  I didn't see any errors when using Sheet 1 for all valid ranges.  I then changed rang_6 to point to the empty Column E and got a vector of zeros (as expected from an empty column).

 

2024 10 20 D.png

 

Stuart

Thank you Stuart

Announcements

Top Tags