LC problems with a not so gigantic stack

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: LC problems with a not so gigantic stack

Post by dunbarx » Sat Oct 07, 2023 2:00 am

The backstory is that I had to move a 1.5 MB Excel file from a 20 year old OS9 machine to my Mac Mini. Straight excel format did not work, nor did CSV. Headers only were returned for each. I am not sure why.

Copied as straight text, however, came over as a terminal file, but the full dataset was readable. I discovered early on that there was only 18 lines in it, and those were likely derived from peculiar large blank portions of the raw data. The original text had nearly 600 regular excel lines.

I thought it would be easy until i realized that all the tabs and returns were deleted. Hence the hunt for certain words that I could use to parse that data back into a usable form.

Thank heaven for the modern itemDelimiter.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: LC problems with a not so gigantic stack

Post by FourthWorld » Sat Oct 07, 2023 5:25 am

CSV is text. How did it not work?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7238
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: LC problems with a not so gigantic stack

Post by jacque » Sat Oct 07, 2023 4:22 pm

I'm guessing there are some hidden line endings in the file which LC treats as plain text. If you look at the file in a text editor that shows hidden characters you might see them. Replace with line feeds and you might get normal lines in LC. BBEdit could do it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: LC problems with a not so gigantic stack

Post by dunbarx » Sat Oct 07, 2023 5:03 pm

I have always had issues bringing really old Excel files into a modern machine and simply opening them there. When I tried CSV, the terminal in my Mac Mini held only a few obscure "header" type lines of text, and none of the "body". Plain text brought over just the body, but was missing tabs and returns.

Thanks for the talk, but I am done with it. My parsing gadgetry restored the original lines intact. This is not an Excel forum.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: LC problems with a not so gigantic stack

Post by FourthWorld » Sat Oct 07, 2023 5:22 pm

I respect that you're done, so this is for others who may come across this in the future:

Terminal may interpret some text as directives.

If you want to read raw text from a text file try opening it in a text editor.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: LC problems with a not so gigantic stack

Post by FourthWorld » Fri Nov 17, 2023 3:24 pm

Hi oblix. What are you building with LiveCode?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: LC problems with a not so gigantic stack

Post by dunbarx » Fri Nov 17, 2023 3:54 pm

@oblix.

Recall that the issue is not about large amounts of data per se, but about REALLY long single lines displayed in a field. It is that particular aspect of a field's contents that causes the issue.

Craig

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: LC problems with a not so gigantic stack

Post by stam » Sun Nov 19, 2023 12:47 pm

Out of curiosity is this sensitive data or are u able to share the source spreadsheet?

I have many times had to parse outputs from medical devices supposedly in excel format but not really, or other strange formats and am curious….

S.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: LC problems with a not so gigantic stack

Post by dunbarx » Sun Nov 19, 2023 6:02 pm

Stam.
...share the source spreadsheet?
It no longer exists in LC, since after the stack I made to carve it up was successful, I tossed it.

But I have the old Mac v.9 spreadsheet and can copy to a text file. Watch this space...

Craig

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: LC problems with a not so gigantic stack

Post by stam » Sun Nov 19, 2023 8:04 pm

dunbarx wrote:
Sun Nov 19, 2023 6:02 pm
Stam.
...share the source spreadsheet?
It no longer exists in LC, since after the stack I made to carve it up was successful, I tossed it.

But I have the old Mac v.9 spreadsheet and can copy to a text file. Watch this space...

Craig
I think the old excel file might be more interesting... the process of converting to text may in itself indroduce issues...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: LC problems with a not so gigantic stack

Post by dunbarx » Sun Nov 19, 2023 10:10 pm

Stam.

Hmmm. I will see if I can just attach the file itself.

Craig

Post Reply

Return to “Talking LiveCode”