Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to write a cell with microsoft interop

I have the following line:

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[g, 3]).Value2 =
indice;

this line executed but does not do anything, the cell is no affected...

Any idea????



-----------------------------------------------------------------------------
Less Spam Better enjoyable experience
Visit : news://spacesst.com
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default How to write a cell with microsoft interop


Without the preceeding code I cannot be certain. Are you assigning a value
to 'g', as the Cells method requires the row then column numbers rather than
its alphabetic equivalent, so maybe your code should read:-

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[3,7]).Value2 = indice;
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Jean Osorio" wrote:

I have the following line:

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[g, 3]).Value2 =
indice;

this line executed but does not do anything, the cell is no affected...

Any idea????


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to write a cell with microsoft interop


That's rigth

for (int g= 5102; g <= filas; g++)

"Alan Moseley" wrote:

Without the preceeding code I cannot be certain. Are you assigning a value
to 'g', as the Cells method requires the row then column numbers rather than
its alphabetic equivalent, so maybe your code should read:-

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[3,7]).Value2 = indice;
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Jean Osorio" wrote:

I have the following line:

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[g, 3]).Value2 =
indice;

this line executed but does not do anything, the cell is no affected...

Any idea????


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default How to write a cell with microsoft interop


According to the help screen, Value2 cannot be Currency or Date data types,
but you should still see values changing. Are you sure that you are
assigning indice a value before running your line of code?
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Jean Osorio" wrote:

That's rigth

for (int g= 5102; g <= filas; g++)

"Alan Moseley" wrote:

Without the preceeding code I cannot be certain. Are you assigning a value
to 'g', as the Cells method requires the row then column numbers rather than
its alphabetic equivalent, so maybe your code should read:-

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[3,7]).Value2 = indice;
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Jean Osorio" wrote:

I have the following line:

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[g, 3]).Value2 =
indice;

this line executed but does not do anything, the cell is no affected...

Any idea????


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default How to write a cell with microsoft interop


what value does 'indice' have??

"Jean Osorio" wrote in message
...
That's rigth

for (int g= 5102; g <= filas; g++)

"Alan Moseley" wrote:

Without the preceeding code I cannot be certain. Are you assigning a
value
to 'g', as the Cells method requires the row then column numbers rather
than
its alphabetic equivalent, so maybe your code should read:-

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[3,7]).Value2 =
indice;
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.


"Jean Osorio" wrote:

I have the following line:

((Microsoft.Office.Interop.Excel.Range)workSheet2. Cells[g, 3]).Value2 =
indice;

this line executed but does not do anything, the cell is no affected...

Any idea????


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
Microsoft.Office.Interop.Excel.Application Andie Excel Programming 1 May 22nd 09 04:27 AM
How to let write only some simbols in the cell in Microsoft Excel Pliushke Excel Programming 2 October 2nd 07 04:27 PM
Namespace Microsoft.Office.Interop Mojtaba Excel Programming 1 June 20th 07 01:25 PM
Where can I find Microsoft.Office.Interop.Excel.dll? Fred Abrahamian Excel Programming 1 December 17th 06 10:52 PM
COMException With Microsoft.Office.Interop.Excel frankvfox Excel Programming 4 September 27th 06 04:36 PM


All times are GMT +1. The time now is 05:44 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"