Results 1 to 10 of 10
- 02-09-2011, 07:56 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 22
- Rep Power
- 0
- 02-09-2011, 12:46 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Since you are writing the content to a text file, you can do something like this.
Calculate the number of rows initially. Once the first column is written into the text file, move to next column and to beginning of the text file. Then read the each line and append the new stuff to is and write back to file.
But my advice is not to do this really. Reason is that process is bulky. Best way is to write the entire line at the same time.
I hope you retrieve data from a database, and the content in a DataTable. So it's easy to deals with line-by-line.
- 02-09-2011, 12:53 PM #3
Member
- Join Date
- Feb 2011
- Posts
- 22
- Rep Power
- 0
Thanx for the reply,
but I don't want some columns from that table, i want to select only some columns and write it to the new file,
can u pls tell me how to move to next column and beginning of the file ??
Pls help me out ......
- 02-10-2011, 06:30 AM #4
Member
- Join Date
- Feb 2011
- Posts
- 22
- Rep Power
- 0
can u pls help me out.................
- 02-10-2011, 07:40 AM #5
Member
- Join Date
- Feb 2011
- Posts
- 22
- Rep Power
- 0
I need to write particular excel columns to one notepad for my applicarion
so i need to column wise write to tat text file....... pls help me out
- 02-10-2011, 07:41 AM #6
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
The short answer is that you can't write to a text file column-by-column. Text files just don't work like that. So if you want to create a text file like that, you need to compose it one line at a time.
Write a sample out on paper, thinking about what you are doing step-by-step. Then come back and tell us what all the steps are, and we can help you turn that into Java code.
-Gary-
- 02-10-2011, 07:57 AM #7
Member
- Join Date
- Feb 2011
- Posts
- 22
- Rep Power
- 0
EmpId Name Designation Order
1 ABC Software Engineer 7/8/2010
2 DFG Sr Software Engineer 7/15/2010
3 LOI Team Leader 9/1/2010
4 LKJ Project Manager 9/1/2010
5 QWE Software Architect 8/23/2010
This is in Excel, I want Name and Order columns in csv file with some delimiter like dis
Name, Order
ABC,7/8/2010
DFG,7/15/2010
LOI,9/1/2010
LKJ,9/1/2010
QWE,8/23/2010
for me i am getting output in the same colum like dis
Name
ABC
DFG
LOI
LKJ
QWE
Order
7/8/2010
7/15/2010
9/1/2010
9/1/2010
8/23/2010
Pls help me out..........
- 02-15-2011, 01:09 AM #8
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 02-15-2011, 01:11 AM #9
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 02-15-2011, 01:13 AM #10
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Similar Threads
-
insert row and column and delete row and column
By daredavil82 in forum New To JavaReplies: 13Last Post: 09-22-2011, 06:10 PM -
[SOLVED] How do you align/justify idividual table column header text?
By Angie in forum New To JavaReplies: 4Last Post: 02-05-2011, 06:47 PM -
Reading CSV file with miltiline column
By dekha in forum Advanced JavaReplies: 8Last Post: 12-13-2010, 09:23 AM -
Add new column to csv file
By Tota in forum New To JavaReplies: 0Last Post: 08-31-2010, 03:32 PM -
selecting column names dynamically from table column header
By neha_sinha in forum AWT / SwingReplies: 1Last Post: 07-06-2010, 04:50 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks