473,471 Members | 4,650 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to access cells in an Excel Spreadsheet by row and column

I would like to set a particular cell in an Excel Spreadsheet to a specific
value

Visual Basic Equivalent would be

Cells(row, column) = x

where row and column locate the cell and x is the value

In C++, I can execute code such as

Excel::Range* range1 = worksheet->get_Range(S"G1", Missing:Value);

to obtain a range object which points ot G1 (row 1, column 7). However, I
cannot find an equivalent to access G1 by its row and column

I have tried get_Range(S"r1c7", Missing:Value) but this does not work.

worksheet->get_Cells() returns a range but does not take any parameters.

Any suggestuions?

Howard Weiss

Nov 17 '05 #1
1 4136
The following works

Excel::Range* range1 = worksheet->get_Range(S"G1", Missing::Value);
Excel::Range* rangex = range1->get_Resize(S"5", S"5");
Excel::Range* rangey = rangex->get_Offset(S"2", S"2");

It is not obvios that get_Resize and get_Offset have the desired function

Howard

"Howard Weiss" <hp*****@comcast.net> wrote in message
news:eN**************@tk2msftngp13.phx.gbl...
I would like to set a particular cell in an Excel Spreadsheet to a specific value

Visual Basic Equivalent would be

Cells(row, column) = x

where row and column locate the cell and x is the value

In C++, I can execute code such as

Excel::Range* range1 = worksheet->get_Range(S"G1", Missing:Value);

to obtain a range object which points ot G1 (row 1, column 7). However, I
cannot find an equivalent to access G1 by its row and column

I have tried get_Range(S"r1c7", Missing:Value) but this does not work.

worksheet->get_Cells() returns a range but does not take any parameters.

Any suggestuions?

Howard Weiss

Nov 17 '05 #2

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

Similar topics

1
by: Ronny Sigo | last post by:
Hello all, I am trying to import the contents of an Excel sheet into my Access Database. When clicking the button excel opens allright and does what I programmed (the cells get updated with the...
0
by: ImraneA | last post by:
Hi there Many thanks to those people who contributed to this group, helped me greatly. Enclose, my code, hope it helps others :- Public Function Export_Excel_9(tbx1 As Variant, tbx2 As...
0
by: ImraneA | last post by:
Hi there Hope this helps others Public Function Export_Excel_10(dblocation As Variant) On Error GoTo Err_Export_Excel_10 Dim x1 As Excel.Application Dim excelwbkXL As Object
11
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it...
0
by: ImraneA | last post by:
Hi there Have a database, where front-end interface allows user to select a ms access database. From there, standard tables are linked. Routine, that creates a spreadsheet, for each table a...
4
by: ctkevin | last post by:
I am an experienced Access user but recently moved an Access database to the web for my employer. We use a host that does not allow the use of data access pages. Is there anyway to pre-build a...
13
by: nuti | last post by:
Hi all, I am fairly new to VB.I am trying to figure out as how to write a script so that i can read the data from an excel sheet to Access. can u guys please help me out? cheers, nuti
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
7
by: semijoyful | last post by:
OS: Win XP SP2 Access version: 2003 Excel version: 2003 I am new at this, as I am sure you have gathered from this post title:) I am working on a form where users can input data in Access and...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.