If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
quick way to strip lines from excel
7 posts
• Page 1 of 1
quick way to strip lines from excel
Is there a quick way to strip multiple lines via ruby from excel copypaste content?
The problem is with empty cells on the beginning and end of the line. Cells are tab separated.
The problem is with empty cells on the beginning and end of the line. Cells are tab separated.
- Attachments
-
- lines and nils.fsm
- (331 Bytes) Downloaded 797 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: quick way to strip lines from excel
Depends on what you want to do with the data. Should it stay text, including tabs? Or should it be a string array, where a tab without data before results in an empty string entry, like this:
tab5tabtab5return = ["", "5", "", 5]
tab5tabtab5return = ["", "5", "", 5]
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: quick way to strip lines from excel
Can be both, tab version goes for output.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: quick way to strip lines from excel
Hope this helps?
- Attachments
-
- lines and nils[tula].fsm
- (625 Bytes) Downloaded 778 times
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: quick way to strip lines from excel
I'm not exactly sure how to send to output(s) selected input lines?
(I think I messed a bit the question too).
What I'm trying to get is something like on structure in schematic.
Theme 1: cleaning excel copy/paste content from unused lines ( = selecting desired lines), but keeping formatting (tabs),
Theme 2: from that output - selecting some individual lines as arrays (which will contain empty/nil lines, sometimes on the beginning or end).
Basically I'm trying design a sort of statistical calculation sheet for measuremental data.
(I think I messed a bit the question too).
What I'm trying to get is something like on structure in schematic.
Theme 1: cleaning excel copy/paste content from unused lines ( = selecting desired lines), but keeping formatting (tabs),
Theme 2: from that output - selecting some individual lines as arrays (which will contain empty/nil lines, sometimes on the beginning or end).
Basically I'm trying design a sort of statistical calculation sheet for measuremental data.
- Attachments
-
- Schematic1.fsm
- (501 Bytes) Downloaded 802 times
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: quick way to strip lines from excel
Like this?
- Attachments
-
- Schematic1[tula].fsm
- (965 Bytes) Downloaded 776 times
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: quick way to strip lines from excel
Appearently there is some problem within it, because it works with simple matrix and produces an error with larger one. But I found a workaround, and it works.
For conversion between tabs and some reference mark I use something like this:
and then this little fellow works fine with indexes:
For conversion between tabs and some reference mark I use something like this:
- Code: Select all
output @in.tr("\t","^")
and then this little fellow works fine with indexes:
- Code: Select all
output 0, @my_array.values_at(*@indexes)
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 45 guests