?
Solved

discounts[rowCount - currRow, 0] = (int)cellvalue.Value2; excel from vb.net to c#

Posted on 2008-06-10
8
Medium Priority
?
494 Views
Last Modified: 2013-12-17
What is the conversion from vb.net to c#
discounts(rowCount - currRow, 0) = CDbl(cellvalue.Value)

is it

 discounts[rowCount - currRow, 0] = (int)cellvalue.Value2;


                   
0
Comment
Question by:mathieu_cupryk
  • 3
  • 3
  • 2
8 Comments
 
LVL 12

Expert Comment

by:renjurdevan
ID: 21756912

discounts[rowCount - currRow, 0]  = (double)cellvalue.Value;
0
 

Author Comment

by:mathieu_cupryk
ID: 21756923
Error      2      Property, indexer, or event 'Value' is not supported by the language; try directly calling accessor methods 'Microsoft.Office.Interop.Excel.Range.get_Value(object)' or 'Microsoft.Office.Interop.Excel.Range.set_Value(object, object)'      C:\Users\Aministrator\Desktop\InitialPriceReporting\InitialPriceReporting\DotNet\InitialPriceReportingSpreadsheet\Program.cs      113      77      InitialPriceReportingSpreadsheet

it does not see value it sees value2
0
 
LVL 12

Expert Comment

by:renjurdevan
ID: 21756937
i assume discount is array rather than function

if it is function and using for comparison then code will looks like

discounts(rowCount - currRow, 0) == (double)cellvalue.Valuel;
0
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 21756951
discounts[rowCount - currRow, 0] = (double)cellvalue.Value2;
0
 

Author Comment

by:mathieu_cupryk
ID: 21756958
double)cellvalue.Valuel;?
0
 
LVL 12

Expert Comment

by:renjurdevan
ID: 21756967
double)cellvalue.Value;

or

double)cellvalue.Value2;
0
 

Author Comment

by:mathieu_cupryk
ID: 21756977
which one is it in excel.
0
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 2000 total points
ID: 21757015
(double)cellvalue.Value2;
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question