T O P I C R E V I E W |
AKazak |
Posted - 04/05/2022 : 04:32:34 AM OriginPro 2022 (64-bit) SR1 9.9.0.225 Windows 7 Pro SP1 x64
Greetings!
What is the correct function/method to crop/trim (delete rows and columns from the top/bottom and left or right) a worksheet or matrix besides manual row/column manipulation?
Thank you.
--- Andrey |
2 L A T E S T R E P L I E S (Newest First) |
AKazak |
Posted - 04/05/2022 : 10:06:45 PM Dear Chao,
Thank you for providing the detailed information on the topic.
--- Andrey |
ChaoC |
Posted - 04/05/2022 : 3:58:48 PM Hi Andrey,
I have three ways of doing this. First, you can specify the rows and columns you want to keep during import if it is csv/ASCII using the Partial Import option.
OR if you used the csv import connector, you can go back and select a partial import.
Second, you can use Worksheet>Worksheet Query.... Give a test condition that is always true, like 1=1. Unselect the columns you want to trim on the left and enter the rows you want to keep. This method does not modify your dataset as the data is extracted to another worksheet/workbook.
Third, you can use the X-Functions wreducecols and wreducerows. For example, let's say we have a worksheet with 32 rows and 10 cols. If you want to trim the first 3 rows, you would use: wreducerows end:=4 nrows:=3. If you want to want to trim the last 2 columns, you would use: wreducecols start:=9 ncols:=2. Notice the "start" is inclusive and "end" is exclusive. This method would alter your original dataset.
Chao |
|
|