Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem while copying JTable contents into Excel with line breaksincluded

Hai every one
I have a Standalone application in which I am trying to copy contents of JTable into my Excel with line breaks included in my cells of JTable. I have used wrapping using "\"" to my cell contents. It's working fine but I am getting a square box type of symbol in Excel. How to remove the symbol using java while copying? Is there any way to do this?I need a new line to be present in my Excel also similar to my Jtable.I have tried to get the values of that box but i can't find the solution.I have replace "\n" with "\r\n" also but anything is not working.Can any one help me

Thank You
Chaithu

EggHeadCafe - Software Developer Portal of Choice
Essential ASP.NET with Examples in VB.NET
http://www.eggheadcafe.com/tutorials...t-with-ex.aspx
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem while copying JTable contents into Excel with line breaksincluded


It may be just \r. You can use in VBA VBCR, VBLF, VBCRLF instead of \r.
If none of thes work I usually dump the stinrg into the worksheet.


RowCount = 1
for i = 1 to len(MyStr)
Range("A" & rowcount) = mid(MyStr,1,1)
Range("B" & RowCount) = asc(mid(MyStr,1,1))
RowCount = RowCount + 1
next i


this will give you the Ascii values of each of the characters in the
string. Then you can use replace and instead of specifying the
character use the number with Chr(x)


like this

replace(MyStr,chr(10),chr(13))

It it turns out to be just \r then you may want to replace with Chr(13)
& chr(10). windows uses both the \CR and \LF.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=147157

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
Problem with multiple copying of column contents MichaelRobert Excel Worksheet Functions 2 October 28th 08 02:10 PM
Problem: Copying a cell that contains line breaks adds extra quotes [email protected] Excel Discussion (Misc queries) 0 November 2nd 06 07:58 PM
macro for opening all excel files and copying contents roshinpp_77 Excel Programming 2 May 30th 06 01:18 PM
Excel: is it possible to move column contents into a line Ginger Excel Discussion (Misc queries) 2 June 16th 05 06:59 PM
Macro problem on, Yellowed line - previous line or next line. Ed Excel Programming 7 March 29th 05 09:37 PM


All times are GMT +1. The time now is 09:30 PM.

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"