Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi there
I using (READEXCEL) but it read all the values as zeros
they should be these values
It works with the previous values
thanks in advance
Solved! Go to Solution.
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).
Stuart
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 !??
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
I changed that , however it wasn't saved ... range 4 is in the first excel sheet , but I'm getting zeros in mathcad
also in the one below ... it is writen bad sheet what does that mean?
@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!!!!
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.
Hi Werner,
I read what you wrote and solved the issues in my excel sheet while doing that Stuart wrote another answer.. So I wanted to close the thread so I clicked solved in the last reply. I'm sorry I should have clicked the first reply which came from you.
I really appreciate your help, and time ... You are the hero
Hi Yusra, I think you're still within the time limit for changing the Solution, Feel free to select Werner's answer as the Solution.
Stuart
BTW, if you're interested, here's the rang_n Excel range builder.
This saved me a lot of typing and rechecking ranges when I switched sheets and columns to examine what was happening.
Initial Sheet 2 that doesn't exist:
Change to existing Sheet 1 with data in Column 😧
Change to Column E that has no data:
Lots of typing upstream, but far less when changing the ranges.
Stuart
(Yes, of course I used a program to extract the largest line number to read. Heaven forbid, I'd be uncouth enough to manually type a 4-digit number (especially when I still have the cost of the Mathcad licence to amortise). I certainly wasn't going to repeat the tragedy of typing 3147 for the first occurrence of nlines when I could simply have used a program.)
It does not matter which post you mark as 'solution' as long as it fits the question.
I was just confused because you sent the Excel file with the missing columns even a second time, so I assumed you did not notice my remark about the file missing the data you tried to access..
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).
Stuart
Thank you Stuart