Click here to Skip to main content
15,889,216 members
Home / Discussions / Java
   

Java

 
GeneralRe: POI ShrinkToFit Solution Pin
427748028-Sep-09 1:43
427748028-Sep-09 1:43 
GeneralRe: POI ShrinkToFit Solution Pin
DaveyM6928-Sep-09 3:09
professionalDaveyM6928-Sep-09 3:09 
GeneralRe: POI ShrinkToFit Solution Pin
427748030-Sep-09 1:07
427748030-Sep-09 1:07 
GeneralRe: POI ShrinkToFit Solution Pin
DaveyM6930-Sep-09 6:24
professionalDaveyM6930-Sep-09 6:24 
GeneralRe: POI ShrinkToFit Solution Pin
427748030-Sep-09 10:46
427748030-Sep-09 10:46 
GeneralRe: POI ShrinkToFit Solution Pin
DaveyM6930-Sep-09 23:18
professionalDaveyM6930-Sep-09 23:18 
GeneralRe: POI ShrinkToFit Solution Pin
42774801-Oct-09 9:43
42774801-Oct-09 9:43 
GeneralImage in Excel Header/Footer Solution Continuation Pin
42774803-Oct-09 4:13
42774803-Oct-09 4:13 
Another Solution uses PHPExcel[^]. The idea here is after you create the Excel file call:

First we need Xampp[^] Only need the Apache and PHP, then copy the extracted file of PHPExcel to htdocs of Xampp

// 04printing.php is under Tests in the PHPExcel folder. Paste the code below. 
// The name of the Excel file is Test.xlsx so make sure it is the name of your Excel file.
// http://localhost/xampp/phpexcel-28925/Tests/04printing.php
<?php

/** Error reporting */
error_reporting(E_ALL);

/** PHPExcel */
require_once '../Classes/PHPExcel.php';

/** PHPExcel_IOFactory */
require_once '../Classes/PHPExcel/IOFactory.php';

// Create new PHPExcel object
echo date('H:i:s') . " Create new PHPExcel object\n";
$objPHPExcel = PHPExcel_IOFactory::load("Test.xlsx");

// Set header and footer. When no different headers for odd/even are used, odd header is assumed.
echo date('H:i:s') . " Set header/footer\n";
$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&G&C&HPlease treat this document as confidential!');
$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&G&C&HPlease treat this document as confidential!');

// Add a drawing to the header
echo date('H:i:s') . " Add a drawing to the header\n";
$objDrawing = new PHPExcel_Worksheet_HeaderFooterDrawing();
$objDrawing->setName('PHPExcel logo');
$objDrawing->setPath('./images/phpexcel_logo.gif');
$objDrawing->setHeight(36);
$objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_FOOTER_LEFT);

// Set active sheet index to the first sheet, so Excel opens this as the first sheet
$objPHPExcel->setActiveSheetIndex(0);

		
// Save Excel 2007 file
echo date('H:i:s') . " Write to Excel2007 format\n";
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('Test.xlsx');


That would add the header/footer. This is what I reached so far I will wrap it up with a nice hidden gui and post back. Do tell if it helps

Regards
GeneralRe: Image in Excel Header/Footer Solution Continuation Pin
42774803-Oct-09 9:00
42774803-Oct-09 9:00 
Questionhow to set thread affinity in JAVA Pin
evyatar.v25-Sep-09 11:13
evyatar.v25-Sep-09 11:13 
AnswerRe: how to set thread affinity in JAVA Pin
427748025-Sep-09 19:29
427748025-Sep-09 19:29 
GeneralRe: how to set thread affinity in JAVA Pin
evyatar.v25-Sep-09 21:40
evyatar.v25-Sep-09 21:40 
GeneralRe: how to set thread affinity in JAVA Pin
427748026-Sep-09 0:05
427748026-Sep-09 0:05 
QuestionNeed help with hash table Pin
snssewell24-Sep-09 22:21
snssewell24-Sep-09 22:21 
AnswerRe: Need help with hash table Pin
427748025-Sep-09 0:39
427748025-Sep-09 0:39 
GeneralRe: Need help with hash table Pin
snssewell25-Sep-09 19:30
snssewell25-Sep-09 19:30 
QuestionRead SDF using Java Pin
jason975424-Sep-09 21:30
jason975424-Sep-09 21:30 
AnswerRe: Read SDF using Java Pin
427748025-Sep-09 0:36
427748025-Sep-09 0:36 
GeneralRe: Read SDF using Java Pin
jason975425-Sep-09 4:12
jason975425-Sep-09 4:12 
GeneralRe: Read SDF using Java Pin
427748025-Sep-09 8:25
427748025-Sep-09 8:25 
GeneralRe: Read SDF using Java Pin
jason975425-Sep-09 23:47
jason975425-Sep-09 23:47 
GeneralRe: Read SDF using Java Pin
427748026-Sep-09 1:32
427748026-Sep-09 1:32 
GeneralRe: Read SDF using Java Pin
David Skelly28-Sep-09 22:29
David Skelly28-Sep-09 22:29 
QuestionJava Graphics and Desktop Pin
sharkbc24-Sep-09 17:45
sharkbc24-Sep-09 17:45 
AnswerRe: Java Graphics and Desktop Pin
427748024-Sep-09 18:51
427748024-Sep-09 18:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.