My quesion is mostly basic, I have the following line of code:
chartWorkbook.SeriesCollec
tion(1).In
terior.Col
or = RGB(0, 255, 0)
When this line of code is added I get this error:
Unhandled Exception: System.Runtime.InteropServ
ices.COMEx
ception (0x800A03EC): U
nable to set the Color property of the Interior class
at Microsoft.VisualBasic.Comp
ilerServic
es.LateBin
ding.Inter
nalLateSet
(Object
o, Type& objType, String name, Object[] args, String[] paramnames, Boolean Optim
isticSet, CallType UseCallType)
at Microsoft.VisualBasic.Comp
ilerServic
es.NewLate
Binding.La
teSet(Obje
ct Insta
nce, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, T
ype[] TypeArguments, Boolean OptimisticSet, Boolean RValueBase, CallType CallTyp
e)
at Microsoft.VisualBasic.Comp
ilerServic
es.NewLate
Binding.La
teSetCompl
ex(Objec
t Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentN
ames, Type[] TypeArguments, Boolean OptimisticSet, Boolean RValueBase)
at ConsoleApplication1.Module
1.MakeGrap
h(Int32 ArrayWidth, Int32 ArrayLength,
String MetricType, Int32 jstart, Object WorksheetName, String ChartViewportName
)
at ConsoleApplication1.Module
1.SetupGra
ph(String MetricType, Object XLSXWorkb
ook)
at ConsoleApplication1.Module
1.Main()
I have a pretty good idea on why this is a problem, well if you look at the end of the error you see "XLSXWOrkbook", 2003 does not support XLSX files!!!
But I am saving the file as "excelWorkbook.SaveAs(File
Input & ".xls")", so I would not think that the file is an xlsx file, but it must be???
Maybe the problem is that I am compling on a machine with Office 2007??
HELP!
Start Free Trial