Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too much space (gap) between data in Excel spreadsheet

Status
Not open for further replies.

okeyuzosike

Programmer
Jun 15, 2007
15
US
I used fuction:"CopyFromRecordset" to move data from access file to excel spreadsheet. When I display/print the contents of the spreadsheet, the records are too far apart. Also, each cell size is very large. How can I get the records to display/print normally, like close enough: for example like this:

When the spreadsheet is displayed, the data in the spreadsheet should look like this:
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"
"ukkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"

NOT like this:
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"



"ukkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"

I tried using the "MergeCells" function, it diplays only the first line of record in the first cell.
I wish there's a way I could insert the spreadsheet so you guys can see it.

Thank you for your anticipated assistance.
okey.
 
Are you sure the data in the Recordset are trimmed ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
cells.entirerow.autofit ?


[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
sounds like you copied some formatting. How many records (rows) do you have? all the gaps the same size? You could manually fix the import if you're in a hurry.
 
Hi "ajetrumpet",
thanks for your response. I used a straight "SELECT" statement to populate the recordset, then used "CopyFromRecordset" to import the record into a spreadsheet. You said something about manually fixing the import, How can I manually fix the import? Do you mean inside the spreadsheet itself?

Hi PHV,
thank you also for your input. I know I can trim a single field at one time, how do I trim the whole data in the recordset?

You all have a wonderful weekend.
Okey.

 
I meant, if the data returned by the recordset have lot of trailing spaces then you may use some trim function in the SELECT instruction.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top