0

I have an Excel file stored at a file system location. I have the path in my Oracle procedure. I, however, can't find any resource online that would guide me in-

  • Write data to a particular sheet in the Excel file
  • Run a particular VBA function
  • Read data from a particular sheet in the Excel file

Reinforce- I need to achieve all three of these through an Oracle procedure.

Any resources would be helpful.

Note: I am not trying to call an Oracle query or function through Excel. I am quite able to do that using ODBC. I am asking for something that's the exact opposite.

2
  • 2
    You could write a Java program which does all these operations. Then you can call the Java program from Oracle, see Calling Java Methods in Oracle Database. Or check this one About Building External Procedures Commented Mar 7, 2018 at 6:53
  • 1
    This is a tricky - and highly unusual - requirement which demands some pretty low-level coding. Your starting point should be Anton Scheffer's excellent as_xlsx package; find it here. That package will handle your write requirement. It should be easy enough to extend it to handing the read requirement. Triggering a VBA function might be tough. It depends how you run the function in Excel: I mean, it is gonna be hard to simulate pressing [F5] Commented Mar 7, 2018 at 7:41

1 Answer 1

1

#1 and #3 can be done using the Alexandria PL/SQL Utils library. It's great and I use it for this sort of thing all the time.

#2 is never going to happen. You'd essentially have to write a VBA engine inside PL/SQL. A better question is, why is this a requirement? What are you trying to do?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.