Jump to content

open, modify and save


Akasha

Recommended Posts

hii have an excel file on the server. :) now i want to open it local with asp.then modify the workbook and submit the button so that the changed wiil be saved.it must also be printed to a pdf creator so i have a copy from th file in pdf format.is this possible, and if so, do you have a example of a code somewhere :) thanks in advance

Link to comment
Share on other sites

Check here or here for help on the Excel thing. Since it's not an open format, you may run into some problems, but there appears to at least be a component that you can use.With regard to PDF, I doubt you are going to be able to find something that will programmatically convert an Excel document to a PDF. You can just create a PDF, but I'm not sure about the conversion. But if you want to create a PDF, you will have to install a third-party component, which will mean you either need to have access to the web server, or you will need to be really good at sweet-talking the IT staff (purple lipstick is a good start).

Link to comment
Share on other sites

  • 2 weeks later...

Yes but the don't have the code to accomplish what i want.perhaps it wasn't clear. let my try to explain it again.I have an website and an excel file. (already an existing one with data)I want to view the complete excel in the browser, like ou would see it in excel.So that the employees can add record, modify the data or something.Then when they push a button, those modification are been saved.So i though what if i work with a macro, but i can't figure out how to close that excel so he uses the macro.Does anyone know how to fix this???

Link to comment
Share on other sites

Ok i have created a macro.

Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("a1:f10")) Is Nothing Then  Exit Sub Else  ActiveWorkbook.Save End IfEnd Sub

Local it works fine

<IFRAME FRAMEBORDER="0" SRC="<%=Server.MapPath("bestand2.xls")%>"  WIDTH="90%" height="300" SCROLLING="no"></IFRAME>

But when i want to use it on the server, using the iframe code, he wants to open the file local, and that logicalbut when i do it like this

<IFRAME FRAMEBORDER="0" SRC="<%=paginalocatie%>Uploads/bestand2.xls"  WIDTH="90%" height="300" SCROLLING="no"></IFRAME>

paginalocatie is the location which i am getting from a databaseThen he want to save it, getting the message file already exists do you want to replace, then i say yes, but nothing happens :)Does anyone how to figure this out??

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...