Support

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

For general discussion related FlowStone

quick way to strip lines from excel

Postby tester » Wed Jan 20, 2016 5:57 pm

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.
Attachments
lines and nils.fsm
(331 Bytes) Downloaded 796 times
Need to take a break? I have something right for you.
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

Postby tulamide » Wed Jan 20, 2016 6:15 pm

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]
"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

Postby tester » Wed Jan 20, 2016 6:36 pm

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.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: quick way to strip lines from excel

Postby tulamide » Wed Jan 20, 2016 6:54 pm

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

Postby tester » Wed Jan 20, 2016 9:38 pm

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.
Attachments
Schematic1.fsm
(501 Bytes) Downloaded 801 times
Need to take a break? I have something right for you.
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

Postby tulamide » Thu Jan 21, 2016 2:30 am

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

Postby tester » Fri Jan 22, 2016 12:44 pm

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:

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.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet


Return to General

Who is online

Users browsing this forum: No registered users and 73 guests