Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Jexcel - Detecting Macros Within Excel Files

Posted on 2009-07-02
2
Medium Priority
?
1,364 Views
Last Modified: 2013-11-23
I was wondering if anyone knew of a method within Jexcel that could detect macros.  I know of the allowMacros() method, but I don't want potentially harmful/malicious code to be in there period.  I would much rather just detect if there are macros on the page and then route the user to an error page if true.
0
Comment
Question by:BusyBeee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
Michal-Drozd earned 2000 total points
ID: 24765014
Hi,
I have solution for you. There is method of WorkbookParser class called containsMacros()

here is java doc:
http://www.docjar.com/docs/api/jxl/read/biff/WorkbookParser.html

use it and you can detect macros in workbook
0
 

Author Closing Comment

by:BusyBeee
ID: 31599167
Thanks for finding it.  I'll have to check tues. to see if we have this.
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This video teaches viewers about errors in exception handling.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question