473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Fetching data from excel.. junk value is appended.

Hi im fetching data from excel using python code.. i could see some junk value also with it. like [text:u

How to remove it.. below is the code



Expand|Select|Wrap|Line Numbers
  1. from xlrd import open_workbook
  2. from win32com.client import Dispatch
  3. book = open_workbook('C:/Users/742123/Desktop/test.xls')
  4. sheet0 = book.sheet_by_index(0)
  5. #sheet1 = book.sheet_by_index(1)
  6.  
  7. print sheet0.col(0) 
  8. print sheet0.col(2)
  9. print sheet0.col(3)
  10. print sheet0.col(4)
  11. print sheet0.col(5)
  12. print sheet0.col(6)
  13. print sheet0.col(7)
  14. print sheet0.col(8)
  15. print sheet0.col(9)
  16. print sheet0.col(10)
  17. print sheet0.col(12)
  18. print sheet0.col(13)
  19. print sheet0.col(14)
  20. print sheet0.col(15)
  21. print sheet0.col(16)
  22. print sheet0.col(17)
  23. print sheet0.col(18)
  24. print sheet0.col(19)
  25. print sheet0.col(20)
  26. print sheet0.col(21)
  27. print sheet0.col(22)
  28. print sheet0.col(23)
  29. print sheet0.col(24)
  30. print sheet0.col(25)
  31. print sheet0.col(26)
  32. print sheet0.col(27)
  33.  
Mar 15 '13 #1
1 1551
dwblas
626 Expert 512MB
We have no idea what "junk" means or where in the file it is located so can not offer any advice. First you have to somehow quantify what you want and what you do not want. Also, you can print columns 2 through 27 with a for() loop.
Expand|Select|Wrap|Line Numbers
  1.  for ctr in range(2, 28):
  2.     if 11 != ctr:  ## omit
  3.         print print sheet0.col(ctr) 
Mar 17 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: matthew_carver | last post by:
Hello, I have an ASP page that loops through a SQL Server 2000 table, then downloads an Excel sheet the users can save, etc. Works fine, except, I see that in one particular "comments" field the...
6
by: komal | last post by:
hi all basically my problem is i have to write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function...
5
by: risha | last post by:
void FlashReadM(volatile unsigned long *fl_ad,unsigned long abb) { unsigned long ulvald; abb=2; ulvald=0; //fl_ad=(volatile unsigned long *)0x8020; ulvald= *(fl_ad); //return ucVal; }
1
by: Srinivasan R | last post by:
Hi, I am trying to get asynchronous fetching of data from sql server database. I would like to show the progress of fetching records in GUI. Is there any simple/complex steps for the same in C#...
1
by: Stu | last post by:
Hi, I am trying to return the data key field value from a dataset when I select a row in a datagrid after the datagrid has been bound to a dataset. When I an the Edit, Update and Cancel row I...
1
by: Reny J Joseph Thuthikattu | last post by:
Hi, Can any one guide me to fetch data from excel 2000 using vb.net(i am using vs 2002) Reagdrs Reny ---
1
by: deepdata | last post by:
Hi, I am trying to fetch data from db2 (express version) database by calling stored procedure. I have tried to use both cursor and for loop but still i am getting error. --======Start...
0
by: Bhavesh | last post by:
Hello genious people, I m trying to insert a LARGE text from Multiline Textbox into my table of sqlserver2000. I m using vs-2005. Please note that I dont want to store blob data From FILE TO...
1
by: Pradeep | last post by:
Hi All, I am facing an issue where length method of std::string class gives a junk value when used in a expression. Here's an example. The code should not go into the for loop but it does...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.