검색결과 리스트
Java에 해당되는 글 5건
- 2014.11.19 자바 애플릿 메모리 용량 변경 1
- 2014.11.14 JDBC 연결 폼
- 2014.04.28 POI 관련 링크
- 2014.03.17 HTML 탭 오더 (Tab order), 탭키 눌렀을때 순서
- 2014.03.06 영업일 계산 참조 링크
글
자바 애플릿 메모리 용량 변경
제니퍼 모니터링 사용중 메모리 부족으로 곤란해서 다음과 같이 설정함 (제니터소프트의 메뉴얼에 있는 내용)
제어판 - Java - Java 제어판에서 Java 탭 선택 후 "보기(V)..." 클릭
경로 옆 Runtime 매개변수에 -Xms400m -Xmx400m 추가 후 적용
'Java' 카테고리의 다른 글
| JDBC 연결 폼 (0) | 2014.11.14 |
|---|---|
| POI 관련 링크 (0) | 2014.04.28 |
| HTML 탭 오더 (Tab order), 탭키 눌렀을때 순서 (0) | 2014.03.17 |
| 영업일 계산 참조 링크 (0) | 2014.03.06 |
설정
트랙백
댓글
글
JDBC 연결 폼
Class.forName("com.mysql.jdbc.Driver");
Connection conn = null;
conn = DriverManager.getConnection("jdbc:mysql://hostname:port/dbname","username", "password");
conn.close();
'Java' 카테고리의 다른 글
| 자바 애플릿 메모리 용량 변경 (1) | 2014.11.19 |
|---|---|
| POI 관련 링크 (0) | 2014.04.28 |
| HTML 탭 오더 (Tab order), 탭키 눌렀을때 순서 (0) | 2014.03.17 |
| 영업일 계산 참조 링크 (0) | 2014.03.06 |
설정
트랙백
댓글
글
POI 관련 링크
http://poi.apache.org/apidocs/index.html
http://blog.naver.com/kyt0223/20019654763
http://nanstrong.tistory.com/41
http://blog.naver.com/nuj9310/10013945327
http://stackoverflow.com/questions/20966818/apache-poi-setting-left-right-print-margin-in-excel
http://www.javaservice.net/~java/bbs/read.cgi?m=devtip&b=poi&c=r_p&n=1214206026&p=1&s=t
http://blog.naver.com/ddduuu12/50182011067
http://blog.naver.com/stpoo/206839732
http://loves-textcube.blogspot.kr/2009/06/poi.html
인쇄시 여백관련 설정이 필요했음. 개인적으로 세번째 링크가 가장 유용했음
POI 관련해서 비밀번호를 거는 부분 관련해서 검색
http://stackoverflow.com/questions/8817290/create-a-password-protected-excel-file-using-apache-poi
https://gist.github.com/ozero/1080046
http://poi.apache.org/encryption.html
http://stackoverflow.com/questions/18407725/get-the-excel-workbook-password-using-apache-poi
http://comments.gmane.org/gmane.comp.jakarta.poi.user/16551
http://rocksolutions.wordpress.com/2010/06/10/protecting-excel-sheets-using-apache-poi/
http://sachinnikam.blogspot.kr/2014/04/apache-poi-password-protected-excel.html
http://www.hanbit.co.kr/network/view.html?bi_id=1544
http://blog.daum.net/dmz7881/5810174
http://blog.naver.com/sd95369/10179301495
XSSF
http://stackoverflow.com/questions/14701322/apache-poi-how-to-protect-sheet-with-options
셀 수정 및 저장시 암호를 필요로 하는 부분만 테스트 성공
읽기 시에 암호를 필요로 하는 부분은 테스트 실패
Apache POI - Password Protected Excel
Apache POI, a project run by the Apache Software Foundation, and previously a sub-project of the Jakarta Project, provides pure Java libraries for reading and writing files in Microsoft Office formats, such as Word, PowerPoint and Excel.
The name POI was originally an acronym for Poor Obfuscation Implementation, referring humorously to the fact that the file formats seemed to be deliberately obfuscated, but poorly, since they were successfully reverse-engineered.
In this tutorial we will use Apache POI library to perform different functions on Microsoft Excel spreadsheet.
Tools & dependencies:
1.Java JDK 1.5 or above
2.Apache POI library v3.8 or above (download)
3.Eclipse 3.2 above (optional)
Create a password protected excel file or use an existing template and make it password protected. This will give the users a "read only" access though. Here's an example where I have an excel file that has a password "sachin"
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.hssf.record.crypto.Biff8EncryptionKey;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.usermodel.Cell;
public class ProtectedExcelFile {
public static void main(final String... args) throws Exception {
String fname = "C:/Users/username/excel.xls"; // Add your excel sheet path
FileInputStream fileInput = null;
BufferedInputStream bufferInput = null;
POIFSFileSystem poiFileSystem = null;
FileOutputStream fileOut = null;
try {
fileInput = new FileInputStream(fname);
bufferInput = new BufferedInputStream(fileInput);
poiFileSystem = new POIFSFileSystem(bufferInput);
Biff8EncryptionKey.setCurrentUserPassword("sachin"); // Use 'sachin' as a password
HSSFWorkbook workbook = new HSSFWorkbook(poiFileSystem, true);
HSSFSheet sheet = workbook.getSheetAt(0);
HSSFRow row = sheet.createRow(0);
Cell cell = row.createCell(0);
cell.setCellValue("THIS WORKS!");
fileOut = new FileOutputStream(fname);
workbook.writeProtectWorkbook(Biff8EncryptionKey.getCurrentUserPassword(), "");
workbook.write(fileOut);
} catch (Exception ex) {
System.out.println(ex.getMessage());
} finally {
try {
bufferInput.close();
} catch (IOException ex) {
System.out.println(ex.getMessage());
}
try {
fileOut.close();
} catch (IOException ex) {
System.out.println(ex.getMessage());
}
}
}
}
Let me know your queries.
'Java' 카테고리의 다른 글
| 자바 애플릿 메모리 용량 변경 (1) | 2014.11.19 |
|---|---|
| JDBC 연결 폼 (0) | 2014.11.14 |
| HTML 탭 오더 (Tab order), 탭키 눌렀을때 순서 (0) | 2014.03.17 |
| 영업일 계산 참조 링크 (0) | 2014.03.06 |
설정
트랙백
댓글
글
HTML 탭 오더 (Tab order), 탭키 눌렀을때 순서
윈도우 기반 어플리케이션을 보면 Tab 키를 눌렀을때 입력 커서가 이동함
이같은 동작을 HTML에서 하려면 input 태그에 tabindex 속성을 주면됨
http://webcheatsheet.com/html/controll_tab_order.php
'Java' 카테고리의 다른 글
| 자바 애플릿 메모리 용량 변경 (1) | 2014.11.19 |
|---|---|
| JDBC 연결 폼 (0) | 2014.11.14 |
| POI 관련 링크 (0) | 2014.04.28 |
| 영업일 계산 참조 링크 (0) | 2014.03.06 |
설정
트랙백
댓글
글
영업일 계산 참조 링크
라이브러리를 제공하기에 API를 설명하는 것 같은데 라이브러리 자체는 보이지 않음.
http://community.inetsoft.com/docs/11.3/devhelp/uf1146866.htm
SQL로 영업일을 구함
http://blog.daum.net/coschao/16
http://blog.daum.net/kk241321/7338344
http://www.sqler.com/bSQLQA/555380
http://database.sarang.net/?inc=read&criteria=oracle&subcrit=qna&aid=38441
실제 프로젝트에는 젤 하단 코드를 적용시켰음
자바로 영업일을 구함
http://nihil007.blog.me/94094767
자바스크립트 달력코드(이걸좀 응용하면 될듯도 한데)
http://flashcafe.org/javascript_source/7312
'Java' 카테고리의 다른 글
| 자바 애플릿 메모리 용량 변경 (1) | 2014.11.19 |
|---|---|
| JDBC 연결 폼 (0) | 2014.11.14 |
| POI 관련 링크 (0) | 2014.04.28 |
| HTML 탭 오더 (Tab order), 탭키 눌렀을때 순서 (0) | 2014.03.17 |
