Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Maximum length of a line?

Hi!

On my invoice sheet, I store the information in a .txt file. Each lin
of the .txt file contain all the data of a particular invoice.

In Excel, before hapening it to the file, I build this line like this
Line = line & NextData & "~" . The ~ as a separator.

This make the line quite long and for my needs, it is still Ok. I hav
no problem with that. I am just curious to know if there is a limit t
the length of a line like this one.

Thanks.

Alai

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Maximum length of a line?

Alain,

AFAIK there is a limit of 1024 characters that can be
displayed in a cell, although this can be increased with
use of Alt+Enter (line break).
However a cell can contain 32,767 character.

If you are using a text file you could look into breaking
your lines up with delimiters, which will import back into
rows of cells.

Regards,
Sandy

-----Original Message-----
Hi!

On my invoice sheet, I store the information in a .txt

file. Each line of the .txt file contain all the data of a
particular invoice.

In Excel, before hapening it to the file, I build this
line like this :
Line = line & NextData & "~" . The ~ as a separator.

This make the line quite long and for my needs, it is
still Ok. I have no problem with that. I am just curious
to know if there is a limit to the length of a line like
this one.

Thanks.

Alain


---
Message posted from http://www.ExcelForum.com/

.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Maximum length of a line?

A text file is a 'serial' device and not obvious limit. A line is simply x characters followed by carriage return + line feed

If you write to a file serially, you can write freely

The real story begins when you try to use the file

With some tools, there are limits to the length of a line (causes truncation or wrapping); the printer is a device where thi is visible
When you read the line back, the host (e.g VB) may have limits.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Maximum length of a line?

Hi,

Thanks!

I don't need to put this line on a cell.

On my invoice sheet, there is a maximum of 37 cell containing data tha
I need to sto Invoice number, date, name , quantity, etc., yo
know!

I just made a test after posting:

for i= 1 to 100000
line = line & "a"
next
open "test.txt" for output as #1
print #1, line
close

and it work. I did not count the number of '"a" in test.txt but ther
sure was a lot.

So that is the way I put my line in my storing file. Of course I put
separator between each data. I use "~" for that purpose.

For now, I don't do nothing with this file. Later, I will retreive dat
for accounting or other purpose.

Do you think it would be wiser to store those data in another sheet o
the workbook instead of dealing with data file like I am doing now.

When I open my invoice.xls, it first read my data file to get the las
invoice that was saved. It get is new invoice number from tha
information. The first data of each line is the saved invoice number.

How would you do that in a sheet. that is how to put the information o
the sheet one invoice after another and then how to retreive the las
invoice number used. This is something I don't know how to do.

Thanks again

Alai

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum length of a number Pé Excel Worksheet Functions 1 October 31st 06 11:42 AM
what is maximum row length in excel dlb1228 Excel Discussion (Misc queries) 2 August 10th 05 02:13 PM
maximum formula length skywalker99 Excel Worksheet Functions 2 March 1st 05 09:30 PM
What is maximum length of URL? Kiloran[_3_] Excel Programming 1 April 14th 04 12:39 PM
Maximum text length? L Buchy Excel Programming 8 September 12th 03 02:09 PM


All times are GMT +1. The time now is 07:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"