473,320 Members | 1,719 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,320 software developers and data experts.

What Type of a cell in an Excell Spreadsheet

Hello,

I have opened an excel file into a .net application and any trying to
determine if column 1 is a checkbox or not. Spreadsheet column 1 has both
Text and Checkboxes. This is what I have tried to far with no success:

For Lines = 1 To xlSht.Cells.Rows.Count
xlRng = xlSht.Cells(Lines, 1)
If xlRng.Value.GetType is boolean Then
xlRng = xlSht.Cells(Lines, 2)
End If
Next

Actually I have tried lots of different ways to determine this and have run
out of ideas, Any assistance will be greatly appreciated.

Thanks,
Chuck
Apr 25 '06 #1
1 1341
Hi,

You did not postr enough information about this matter, but I have two
general Ideas:

If you are using the cell format to define the cell type, you can check the
NumberFormat property of the cell.
If you are using checkboxes, you can either bind them to a cell or not. Then
you can go over the Shapes collection of the active sheet, and check if a
certain check box is found in the column (by comparing the position of the
column - using the left property, and the checkbox position).

In General, the best way to learn Excel, is to record a macro of what you
are trying to accomplish and them check what code was writen by the Excel.

If you want you can post some more details, so I can try to figure out a
more specific solution to your problem.

Good Luck
--
GuyBar
"Charles A. Lackman" wrote:
Hello,

I have opened an excel file into a .net application and any trying to
determine if column 1 is a checkbox or not. Spreadsheet column 1 has both
Text and Checkboxes. This is what I have tried to far with no success:

For Lines = 1 To xlSht.Cells.Rows.Count
xlRng = xlSht.Cells(Lines, 1)
If xlRng.Value.GetType is boolean Then
xlRng = xlSht.Cells(Lines, 2)
End If
Next

Actually I have tried lots of different ways to determine this and have run
out of ideas, Any assistance will be greatly appreciated.

Thanks,
Chuck

May 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: T.S.Negi | last post by:
HI, I HAVE AN EXCEL SHEET WITH SOME DATA, I WANT TO IMPORT THAT DATA (CELL BY CELL WITH MANIPULATION) INTO THE SQL SERVER TABLES BY USING STORED PROCEDURE(IF POSSIBLE). IF ANYBODY HAVE DONE...
2
by: alvis | last post by:
I need to write a windows service that will read a excell spreadsheet and either update a row in my sql db or insert the row. My question is how do i read excell spreadsheet row by row in VB dotnet
2
by: nivas.meda | last post by:
Hi, I have an excel sheet with a graph and cells.If i change the value in the excel cells the graph will reflect.Now i am going to implement this functionality in html page.I successfully saved...
15
by: (PeteCresswell) | last post by:
Got a sample of MS's "Advisor Guide To Microsoft Access" in the mail today - accompanied by a sample "Advisor Guide To Microsoft SharePoint". I skimmed both, but the SharePoint explanation is too...
2
by: 675i76 | last post by:
I need to import a spreadsheet but the spread sheet has blank collums and the first row contains abbreviations (e.g. DEPT. - with period). the transferspreadsheet gives me field names "noname1",...
6
TMS
by: TMS | last post by:
This spreadsheet is almost done, but there is some functionality that is driving me nuts. For instance: a cell, for instance 'a0' is to have 'a0' as a string, but if something is entered like...
1
by: geowong | last post by:
Hi, I'm trying to write a basic version of microsoft excel using ncurses.h to draw the tables, i've declared a class Window and Cell, but i get this error when i try to compile error:...
3
by: spowel4 | last post by:
I need some help with this please: I'm looping through some data to total some figures. Each time the total is calculated I need to insert that total into an excel spreadsheet cell, A2 for...
3
by: somsub | last post by:
Hi, I m facing a problem to add an array as a comment to a MS excel cell using Spreadsheet :: WriteExcel . I m using the below code use Spreadsheet::WriteExcel; $workbook =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.