I converted some code :
cellvalue = (Microsoft.Office.Interop.
Excel.Rang
e)inputRan
ge.Cells(r
owCount, pricesColumn);
if (Strings.Len(cellvalue.Val
ue) > 0)
{
if (cellvalue.Value.ToString == "Stones" | cellvalue.Value.ToString == "Tough")
{
// all prices have been read
currRow = rowCount + 1;
// skip a row to where the discounts are
break; // TODO: might not be correct. Was : Exit For
}
Price = (double)cellvalue.Value;
cellvalue = (Microsoft.Office.Interop.
Excel.Rang
e)inputRan
ge.Cells(r
owCount, 15);
gradeName = cellvalue.Value.ToString;
Insert_Price_List_Detail(g
radeName, Price);
// insert the prices
}
Error 1 No overload for method 'Open' takes '1' arguments C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 46 1 InitialPriceReportingSprea
dsheet
Error 2 'Microsoft.Office.Interop.
Excel.Rang
e.Cells' is a 'property' but is used like a 'method' C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 70 82 InitialPriceReportingSprea
dsheet
Error 3 The name 'Strings' does not exist in the current context C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 71 25 InitialPriceReportingSprea
dsheet
Error 4 Property, indexer, or event 'Value' is not supported by the language; try directly calling accessor methods 'Microsoft.Office.Interop.
Excel.Rang
e.get_Valu
e(object)'
or 'Microsoft.Office.Interop.
Excel.Rang
e.set_Valu
e(object, object)' C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 71 47 InitialPriceReportingSprea
dsheet
Error 5 Property, indexer, or event 'Value' is not supported by the language; try directly calling accessor methods 'Microsoft.Office.Interop.
Excel.Rang
e.get_Valu
e(object)'
or 'Microsoft.Office.Interop.
Excel.Rang
e.set_Valu
e(object, object)' C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 73 39 InitialPriceReportingSprea
dsheet
Error 6 Property, indexer, or event 'Value' is not supported by the language; try directly calling accessor methods 'Microsoft.Office.Interop.
Excel.Rang
e.get_Valu
e(object)'
or 'Microsoft.Office.Interop.
Excel.Rang
e.set_Valu
e(object, object)' C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 73 78 InitialPriceReportingSprea
dsheet
Error 7 Property, indexer, or event 'Value' is not supported by the language; try directly calling accessor methods 'Microsoft.Office.Interop.
Excel.Rang
e.get_Valu
e(object)'
or 'Microsoft.Office.Interop.
Excel.Rang
e.set_Valu
e(object, object)' C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 80 51 InitialPriceReportingSprea
dsheet
Error 8 'Microsoft.Office.Interop.
Excel.Rang
e.Cells' is a 'property' but is used like a 'method' C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 81 86 InitialPriceReportingSprea
dsheet
Error 9 Property, indexer, or event 'Value' is not supported by the language; try directly calling accessor methods 'Microsoft.Office.Interop.
Excel.Rang
e.get_Valu
e(object)'
or 'Microsoft.Office.Interop.
Excel.Rang
e.set_Valu
e(object, object)' C:\Users\Aministrator\Desk
top\Initia
lPriceRepo
rting\Init
ialPriceRe
porting\Do
tNet\Initi
alPriceRep
ortingSpre
adsheet\Pr
ogram.cs 82 47 InitialPriceReportingSprea
dsheet
from vb.net but
i have errors.
can someone help me out.
Start Free Trial