CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.getting_started Tags:
Item Type: Date Entered: 6/17/2005 9:51:40 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 8 Views: 24 Favorited: 0 Favorite
9 Items, 1 Pages 1 |< << Go >> >|
"tinybunny_8" <
NewsGroup User
Software Development Kit help!!!6/17/2005 9:51:40 PM

0

I am trying to go through the sample in SDK for Excel. To build the sample, it says that I have to set the environment table Excel table.

1. Does it mean system variable or user variable?
2. It gives instruction for Office 2000 and XP, but I have 2003. I found excel.exe under Office11 folder, is this the correct file for 2003?

Then, it says that I have to type "nmake" on the command line. Is it talking about command prompt? If so, it says that "command is not recognized."

Please help!!! thank you in advanced.

Irma
"Xanderno" <>
NewsGroup User
Re: Software Development Kit help!!!6/18/2005 12:22:51 AM

0

I'm confused...Can you please clarify how ASP.Net figures into this?  (I assume that it does, since this is an ASP.Net forum)
"tinybunny_8" <
NewsGroup User
Re: Software Development Kit help!!!6/18/2005 6:13:32 PM

0

Hi Xanderno,

Yes, I am working on a ASP.NET website, and I need to implement excel application on a page (please see my thread "update excel on web"). Someone told me that maybe I could check  .NET Software Development Kit (programs->Microsoft .NET Framework SDK 1.1-> Samples and quickstart tutorials).
I hope this clarifies your confusion, and maybe you could help me with my question.

"Xanderno" <>
NewsGroup User
Re: Software Development Kit help!!!6/18/2005 9:58:05 PM

0

Ehh...I can't find that particular post.  If you could post a link, I'd be happy to take a look at it.

As to the current question, you'll find the environmental variables in your computer settings, and if you have Visual Studio, into the Visual Studio tools, run the Visual Studio command prompt, and nmake *will* be recognized from there.  (Assuming, possibly, that you've installed the C++ components.)
"tinybunny_8" <
NewsGroup User
Re: Software Development Kit help!!!6/18/2005 10:38:55 PM

0

Xanderno,

Here is the link....

http://forums.asp.net/960678/ShowPost.aspx
.
I really appreciate your help...

Irma
"Caddre" <>
NewsGroup User
Re: Software Development Kit help!!!6/18/2005 11:53:31 PM

0

Office 11 is Office 2003 and try the link below for more info about NMake.  Hope this helps.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcug98/html/_asug_overview.3a_.nmake_reference.asp
Kind regards,
Gift Peddie
"Xanderno" <>
NewsGroup User
Re: Software Development Kit help!!!6/19/2005 2:40:22 AM

0

Oy...I think, that it's going to be most cost-effective (most likely) for you to buy a component that supports this sort of interaction out of the box.  Something like this: http://officewriter.softartisans.com



"tinybunny_8" <
NewsGroup User
Re: Software Development Kit help!!!6/21/2005 1:04:44 PM

0

Hi Xanderno,

I found a way to work around this. It works well on my machine, but it crashes on the development server. I am not quite sure why because I just copied and pasted it. Incase you want to know the code:

Private objExcel As New Excel.Application

Private wb As Excel.Workbook

Private strSQL As String

Private ds As New DataSet

Private dr As DataRow

Private strConn As String

Private eventDel_BeforeBookClose As Excel.AppEvents_WorkbookBeforeCloseEventHandler

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

If Not IsPostBack Then

Dim file As FileInfo

Dim file2 As FileInfo

file = New FileInfo("C:\Junk\coba.xls")

file2 = New FileInfo("C:\Junk\coba2.xls")

' If the workbooks already exist, prompt to delete.

If Dir("C:\Junk\coba.xls") <> "" Or Dir("C:\Junk\coba2.xls") <> "" Then

If Dir("C:\Junk\coba.xls") <> "" Then file.Delete()

If Dir("C:\Junk\coba2.xls") <> "" Then file2.Delete()

End If

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _

"Data Source=C:\Junk\coba.xls;" & _

"Extended Properties=""Excel 8.0;HDR=YES"""

Dim conn As New OleDbConnection

conn.ConnectionString = strConn

conn.Open()

Dim cmd1 As New OleDbCommand

cmd1.Connection = conn

cmd1.CommandText = "CREATE TABLE SalesPromo (UPC char(255), store_num char(255))"

cmd1.ExecuteNonQuery()

strSQL = "Select * from salesPromotion "

ds = DataHandler.GenDataSet(strSQL, DataHandler.GetConnStr())

For Each dr In ds.Tables(0).Rows

cmd1.CommandText = "INSERT INTO SalesPromo (UPC, store_num) values " & _

"('" & dr("UPC") & "', '" & dr("store_num") & "')"

cmd1.ExecuteNonQuery()

Next

conn.Close()

wb = objExcel.Workbooks.Open("C:\Junk\coba.xls")

Dim strWorkSheetName As String = "SalesPromo"

Dim sbExcelData As System.Text.StringBuilder

Dim aWorkSheet As Excel.Worksheet

 

aWorkSheet = CType(wb.Sheets(strWorkSheetName), Excel.Worksheet)

aWorkSheet.Activate()

eventDel_BeforeBookClose = New Excel.AppEvents_WorkbookBeforeCloseEventHandler(AddressOf BeforeBookclose)

AddHandler objExcel.WorkbookBeforeClose, eventDel_BeforeBookClose

objExcel.Visible = True

lblStatus.Text = "Please click the button "

End If

End Sub

Private Sub BeforeBookclose(ByVal wb As Excel.Workbook, ByRef cancel As Boolean)

wb.SaveAs("C:\Junk\coba2.xls")

'Close running excel app

objExcel.Quit()

'Use the Com Object interop marshall to release the excel object

ReleaseComObject(objExcel)

objExcel = Nothing

'force a garbage collection

System.GC.Collect()

End Sub

Private Sub UpdateDB()

Try

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _

"Data Source=C:\Junk\coba2.xls;" & _

"Extended Properties=""Excel 8.0;HDR=YES"""

Dim conn2 As New OleDbConnection(strConn)

Dim da As New OleDbDataAdapter("Select * From SalesPromo", conn2)

Dim ds As DataSet = New DataSet

da.Fill(ds)

Dim dr As DataRow

For Each dr In ds.Tables(0).Rows
lbl.Text = dr("UPC") & " " & dr("store_num")

Next

conn2.Close()

Catch ex As Exception

lbl.Text = ex.Message.ToString

Catch exDB As OleDbException

lbl.Text = exDB.Message.ToString

End Try

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

UpdateDB()

lblStatus.Text = "DB is updated."

End Sub

 

"Xanderno" <>
NewsGroup User
Re: Software Development Kit help!!!6/22/2005 1:05:02 AM

0

I'm glad that you found a solution that'll work for you.  As to the error on the development server (if you haven't gotten it sorted yet) I can't say for sure what it is, particualar without the error message but it's most likely either: 1) Excel isn't installed on the server, or 2) DCOM permissions aren't set properly for the ASPNET account/process to access and instantiate Excel.

Also note that while this solution is fine if you don't have a lot of use, it *will not* scale, so if you've got a heavy traffic application, you're going to be better off looking at another solution.

9 Items, 1 Pages 1 |< << Go >> >|


Free Download:













menu not rendering correctly

problem in using both staticsitemapprovider and web.sitemap

how do you tranfer vb pages into masterpage theme

menus submenus

how can i show a picture in a pop-up ?

why is iscrosspagepostback still evaluating incorrectly?

master page and content page interaction

applying css to a content page

masterpages with iframe

setting application-wide master page

dynamicmenustyle backcolor issue

treeview ontreenodepopulate event

changing treeview items image without postpack

<asp:menu>

the master page does not allow the child page to grow down

theming titleiconimageurl in iwebpart

facing problem in treeview

masterpages and page.controls??

hide panel in my masterpage code from the contentpage.

themes/page wont work in inner child controls

external pages with master pages

extra pixel border with a menu because of 'menu1_skiplink'

need help with asp.net navigation controls

master page drop menu overlap problem

passing a variable in an aspx page object

theming tableheaderrow inside table

menu rendercontrol not working

how to find position coordinates of asp:panel from masterpage using javascript

visual studio 2008 web developer web.sitemap error

xmddatasource problem with xslt transformation

basic treeview issue

menu problem

two sitemaps one for the site one for navigation

masterpages in usercontrols ? how ?

master pages are a joke!

is there a way to turn off an "unknown server tag" for themes?

multiple sitemaps for webcrawlers question

how can i remove meta tags in the head tag

problem: forms authentication removes master layout

master pages - having 3 different footer styles?

hide menu item based on roles

inheritting from a masterpage class.

how to change the contentplaceholder bgcolor using theme skin file?

webpage not displaying in mozilla

menu tiny woes

order page events (with master & child)

contentplaceholder space

how to change dynamicpopoutimageurl on hover of an asp.net menu

create a page or a usercontrol?

?make masterpage menus appear over the content of other pages

   
  Privacy | Contact Us
All Times Are GMT