Examples of ExcelUtils


Examples of com.asakusafw.testtools.excel.ExcelUtils

            if (!lowcaseFilename.endsWith(".xls")) {
                throw new IOException(MessageFormat.format(
                        "Excelファイルではありません({0})",
                        file.getAbsolutePath()));
            }
            ExcelUtils excelUtils = new ExcelUtils(filename);
            TestDataHolder dataHolder = excelUtils.getTestDataHolder();
            dataHolderMap.put(dataHolder.getTablename(), dataHolder);
        }
        startTime = System.currentTimeMillis();
    }
View Full Code Here

Examples of com.asakusafw.testtools.excel.ExcelUtils

     * @throws IOException
     */
    @Test
    public void testNormal() throws Exception {
        String TEST_FILE = "src/test/data/Excel/ExcelUtils/ALLT_TYPES_W_NOERR.xls";
        ExcelUtils excelUtils = new ExcelUtils(TEST_FILE);
        TestDataHolder dataHolder = excelUtils.getTestDataHolder();
        List<Writable> sourceList = dataHolder.getSource();
        List<Writable> expectList = dataHolder.getExpect();

        // sourceList, expectListに正しい値がセットされていることの確認
        testModelObjectList(sourceList);
View Full Code Here

Examples of com.asakusafw.testtools.excel.ExcelUtils

     * @throws Exception
     */
    @Test
    public void testSort() throws Exception {
        String TEST_FILE = "src/test/data/Excel/ExcelUtils/SORT_TEST.xls";
        ExcelUtils excelUtils = new ExcelUtils(TEST_FILE);
        TestDataHolder dataHolder = excelUtils.getTestDataHolder();
        dataHolder.sort();
        List<Writable> expectList = dataHolder.getExpect();
        int expectValue = 0;
        for(Writable modelObject: expectList) {
            expectValue++;
View Full Code Here

Examples of com.asakusafw.testtools.excel.ExcelUtils

     */
    @Test
    public void testCreateTable01() throws Exception {
        // カラム情報のリストを生成
        String filename = "src/test/data/Excel/ExcelUtils/ALLT_TYPES_W_NOERR.xls";
        ExcelUtils excelUtils =  new ExcelUtils(filename);
        List<ColumnInfo> list = excelUtils.getColumnInfos();

        Connection conn = null;
        try {
            conn = DbUtils.getConnection();
            // テーブル作成前にテーブルがあれば削除する
View Full Code Here

Examples of com.asakusafw.testtools.excel.ExcelUtils

     */
    @Test
    public void testDropTable() throws Exception {
        // カラム情報のリストを生成
        String filename = "src/test/data/Excel/ExcelUtils/BAR.xls";
        ExcelUtils excelUtils =  new ExcelUtils(filename);
        List<ColumnInfo> list = excelUtils.getColumnInfos();

        Connection conn = null;
        try {
            // テーブル作成前にテーブルがあれば削除する
            String tablename = list.get(0).getTableName();
View Full Code Here

Examples of com.asakusafw.testtools.excel.ExcelUtils

     * 指定のExcelファイルを読み込みdetaHolderを初期化する
     * @param filename Excelファイルのファイル名
     * @throws Exception
     */
    private void initDataHolder(String filename) throws Exception {
        ExcelUtils excelUtils = new ExcelUtils(filename);
        dataHolder = excelUtils.getTestDataHolder();
        // DBへのストアとDBからのロード
        Connection conn = null;
        try {
            conn = DbUtils.getConnection();
            dataHolder.storeToDatabase(conn, true);
View Full Code Here

Examples of info.jtrac.util.ExcelUtils

       
        add(new Link("exportToExcel") {
            public void onClick() {
                // temporarily switch off paging of results
                itemSearch.setPageSize(-1);
                final ExcelUtils eu = new ExcelUtils(getJtrac().findItems(itemSearch), itemSearch);
                // restore page size
                itemSearch.setPageSize(pageSize);
                getRequestCycle().setRequestTarget(new IRequestTarget() {
                    public void respond(RequestCycle requestCycle) {
                        WebResponse r = (WebResponse) requestCycle.getResponse();
                        r.setAttachmentHeader("jtrac-export.xls");
                        try {
                            Map<Name, String> labels = BasePage.getLocalizedLabels(ItemListPanel.this);
                            eu.exportToExcel(labels).write(r.getOutputStream());
                        } catch (IOException e) {
                            throw new RuntimeException(e);
                        }
                    }
                    public void detach(RequestCycle requestCycle) {
View Full Code Here

Examples of org.displaytag.export.excel.ExcelUtils

     * @param wb The HSSF workbook to write the table.
     */
    public HssfTableWriter(HSSFWorkbook wb)
    {
        this.wb = wb;
        utils = new ExcelUtils(wb);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.