Pouyan-Sepahvand
asked on
How Chartting with Microsoft Excel and ASP.net
Hi,
I would like to use excel 2007 for present a diagram by providing its data via asp.net c#. Would you plese help me?
I would like to use excel 2007 for present a diagram by providing its data via asp.net c#. Would you plese help me?
ASKER
Hi AmanBhullar,
I visited the site but when i imported the code to .net web app i faced error. How can run this sample or import it to .net web app?
I visited the site but when i imported the code to .net web app i faced error. How can run this sample or import it to .net web app?
try this links
http://msdn.microsoft.com/en-us/library/aa701256%28office.11%29.aspx
http://www.asp.net/community/control-gallery/browse.aspx?category=9
http://www.codeproject.com/KB/office/Excel_Automation.aspx
http://www.asp101.com/articles/jayram/exceldotnet/default.asp
Hope it helps
GoodLuck!!!!!!!
http://msdn.microsoft.com/en-us/library/aa701256%28office.11%29.aspx
http://www.asp.net/community/control-gallery/browse.aspx?category=9
http://www.codeproject.com/KB/office/Excel_Automation.aspx
http://www.asp101.com/articles/jayram/exceldotnet/default.asp
Hope it helps
GoodLuck!!!!!!!
ASKER
Dear All,
I faced the following error:
System.Runtime.InteropServ ices.COMEx ception (0x80028018): Old format or invalid type library
When i used one of the solution. I searched to solve the error but i couldn't find a useful one.
All the best
Pouyan
I faced the following error:
System.Runtime.InteropServ
When i used one of the solution. I searched to solve the error but i couldn't find a useful one.
All the best
Pouyan
ASKER
I used visual studio 2005 and office 2007
new reference from the Project->Add References... menu choice. Go to the COM tab and choose the most current Microsoft Excel library. Then go to the References folder under the solutions explorer and remove the Excel and Microsoft.Office.Core references. If you get some compile errors like Excel is not a valid reference or something like that, put this into the using directives:
using Excel = Microsoft.Office.Interop.E xcel;
I am wondering if the the Excel and Microsoft.Office.Core references are causing some conflicts.
I hope this helps.
using Excel = Microsoft.Office.Interop.E
I am wondering if the the Excel and Microsoft.Office.Core references are causing some conflicts.
I hope this helps.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear All,
Thank you very much. Finally i could charting with ASP.NET and Excel by the following step:
1- I used this link: http://www.codeproject.com/KB/aspnet/ExcelShtAndChrt-In-aspx.aspx
2-I faced the following exception:
System.Runtime.InteropServ ices.COMEx ception (0x80028018): Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) at Microsoft.Office.Interop.E xcel.Workb ooks.Open( String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad) at ExcelSheetDisplay.GetListo fSheetsAnd Charts(Str ing strFileName, Boolean bReadOnly, DropDownList drpList) in C:\TEMP\WebApplication1\We bApplicati on1\ExcelS heetDispla y.aspx.cs: line 128
3-After searching i recognized it is a microsoft bug for those who have set up multiple language in her regional setting. For resolving the problem before using Workbooks object should use the following code:
System.Globalization.Cultu reInfo oldCI = System.Threading.Thread.Cu rrentThrea d.CurrentC ulture;
System.Threading.Thread.Cu rrentThrea d.CurrentC ulture = new System.Globalization.Cultu reInfo("en -US");
the link which helped me is:
http://www.gotdotnet.ru/forums/2/52390/256671/#post256671
All the best
Pouyan
Thank you very much. Finally i could charting with ASP.NET and Excel by the following step:
1- I used this link: http://www.codeproject.com/KB/aspnet/ExcelShtAndChrt-In-aspx.aspx
2-I faced the following exception:
System.Runtime.InteropServ
3-After searching i recognized it is a microsoft bug for those who have set up multiple language in her regional setting. For resolving the problem before using Workbooks object should use the following code:
System.Globalization.Cultu
System.Threading.Thread.Cu
the link which helped me is:
http://www.gotdotnet.ru/forums/2/52390/256671/#post256671
All the best
Pouyan
http://www.4guysfromrolla.com/articles/080603-1.aspx
http://www.devx.com/getHelpOn/10MinuteSolution/20506
Hope this will help you