| | |
Formating text to send to spreadsheet.....
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2005
Posts: 32
Reputation:
Solved Threads: 0
I have a program that produces various reports. I need a way to send the reports to MSWorks/MSExcel. At the moment the reports are sent to a locked scrollable text box on-screen. This allows you to copy and paste the information to most word processor programs o.k. Unfortunately as I'm sure some of you already know MSWorks spreadsheet will automatically split a line if there is a comma in it. For example the line "I'm getting fed up with this, so I'm going out" once pasted in will result in the "I'm getting fed up with this" part being in column 1 and the rest in column 2. No good really.
Obviously copying from the text box with the report in does not work for spreadsheets, but is o.k for most wordprocessors. So for the spreadsheet side I'm thinking of sending the report directly to the clipboard using Clipboard.settext and formating the text in such a way that it does not result in a mess. Has anyone got any ideas on this? The only thing I can think of doing at the moment to sort out the problem is to replace the commas with the "/" characted for example. that is far from ideal though.
Obviously copying from the text box with the report in does not work for spreadsheets, but is o.k for most wordprocessors. So for the spreadsheet side I'm thinking of sending the report directly to the clipboard using Clipboard.settext and formating the text in such a way that it does not result in a mess. Has anyone got any ideas on this? The only thing I can think of doing at the moment to sort out the problem is to replace the commas with the "/" characted for example. that is far from ideal though.
I generate a ton of reports directly into Excel using the Excel object object model. This is the best way to do it.
Mark Nemtsas
Time and Billing Software - Time Tracking Software - Roller Shutters - Roller Blinds -
Baby Books
Time and Billing Software - Time Tracking Software - Roller Shutters - Roller Blinds -
Baby Books
•
•
Join Date: Jun 2006
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by MrConfused
I have a program that produces various reports. I need a way to send the reports to MSWorks/MSExcel. At the moment the reports are sent to a locked scrollable text box on-screen. This allows you to copy and paste the information to most word processor programs o.k. Unfortunately as I'm sure some of you already know MSWorks spreadsheet will automatically split a line if there is a comma in it. For example the line "I'm getting fed up with this, so I'm going out" once pasted in will result in the "I'm getting fed up with this" part being in column 1 and the rest in column 2. No good really.
Obviously copying from the text box with the report in does not work for spreadsheets, but is o.k for most wordprocessors. So for the spreadsheet side I'm thinking of sending the report directly to the clipboard using Clipboard.settext and formating the text in such a way that it does not result in a mess. Has anyone got any ideas on this? The only thing I can think of doing at the moment to sort out the problem is to replace the commas with the "/" characted for example. that is far from ideal though.
horizontal data (names) must be transferred into vertical columns in order to be sorted . Do you know how?
thanks! for an answer.. friedolin
![]() |
Similar Threads
- Why won't this code work? (VB.NET)
- Problem formating VB string for clipboard (Visual Basic 4 / 5 / 6)
- Listing words in an Array of text (C++)
- anybody play halo (Geeks' Lounge)
- Good Luck w/This one: Excel Question VBA/Macro/other (MS Access and FileMaker Pro)
- SMS from VisualBasic? (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Datareport -Report Header Section
- Next Thread: Freezing Hangman Program?! + more...
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows




