當前位置:首頁 » 編程語言 » javappt

javappt

發布時間: 2022-02-07 04:50:41

Ⅰ 學習java的PPT課程

java的ppt,不知道你要這個有什麼用
如果你是個新手那麼ppt不建議看,一般人家教程的ppt都是概覽全局的知識,不是很詳細,還不如買本書去看
或者是去看視頻、網路下java多的 很的視頻
如果樓主是在不想自己找,推薦去下淘寶直接損失java視頻,幾塊錢可以買幾十G的學習資料。

Ⅱ 怎樣用JAVA做幻燈片

可以是可以哇,不過要想做的好看那就得下大功夫了,看你用什麼方式做,BS網頁形式的比較好做,如果是CS客戶端做的話就不太好做了,因為java客戶端本來就很醜,做出來也會很醜咯

Ⅲ java 怎麼把ppt轉html

ppt保存為html文件的方法:
用c#可以輕松實現轉換:

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using PPT = Microsoft.Office.Interop.PowerPoint;
using System.Reflection;

namespace WritePptDemo
{
class Program
{
static void Main(string[] args)
{
string path; //文件路徑變數

PPT.Application pptApp; //Excel應用程序變數
PPT.Presentation pptDoc; //Excel文檔變數

PPT.Presentation pptDoctmp;

path = @"C:\MyPPT.ppt"; //路徑
pptApp = new PPT.ApplicationClass(); //初始化

//如果已存在,則刪除
if (File.Exists((string)path))
{
File.Delete((string)path);
}

//由於使用的是COM庫,因此有許多變數需要用Nothing代替
Object Nothing = Missing.Value;
pptDoc = pptApp.Presentations.Add(Microsoft.Office.Core.MsoTriState.msoFalse);
pptDoc.Slides.Add(1, Microsoft.Office.Interop.PowerPoint.PpSlideLayout.ppLayoutText);

string text = "示例文本";

foreach (PPT.Slide slide in pptDoc.Slides)
{
foreach (PPT.Shape shape in slide.Shapes)
{
shape.TextFrame.TextRange.InsertAfter(text);
}
}

//WdSaveFormat為Excel文檔的保存格式
PPT.PpSaveAsFileType format = PPT.PpSaveAsFileType.ppSaveAsDefault;

//將excelDoc文檔對象的內容保存為XLSX文檔
pptDoc.SaveAs(path, format, Microsoft.Office.Core.MsoTriState.msoFalse);

//關閉excelDoc文檔對象
pptDoc.Close();

//關閉excelApp組件對象
pptApp.Quit();

Console.WriteLine(path + " 創建完畢!");

Console.ReadLine();

string pathHtml = @"c:\MyPPT";

PPT.Application pa = new PPT.ApplicationClass();

pptDoctmp = pa.Presentations.Open(path, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
PPT.PpSaveAsFileType formatTmp = PPT.PpSaveAsFileType.ppSaveAsHTML;
pptDoctmp.SaveAs(pathHtml, formatTmp, Microsoft.Office.Core.MsoTriState.msoFalse);
pptDoctmp.Close();
pa.Quit();
Console.WriteLine(pathHtml + " 創建完畢!");
}
}
}
這樣在創建完畢後就可以在c盤找到MyPPT了。

Ⅳ 求畢向東java基礎視頻的PPT

我這有一份PDF版本的

Ⅳ Java如何調用PPT當前頁碼

XWPFDocument docx = new XWPFDocument(POIXMLDocument.openPackage(電月度例會會議紀要.docx)); int pages = docx.getProperties().getExtendedProperties().getUnderlyingProperties().getPages();//總頁數 int wordCount = docx.getProperties().getExtendedProperties().getUnderlyingProperties().getCharacters();// 忽略空格的總字元數 另外還有getCharactersWithSpaces()方法獲取帶空格的總字數。 System.out.println (pages= + pages + wordCount= + wordCount);} public static void parse97() throws Exception { WordExtractor doc = new WordExtractor(new FileInputStream(電月度例會會議紀要.doc));

Ⅵ java 把office word,ppt轉化為圖片

從一個大神那裡學來的,已測試無誤
package com;

import java.awt.Dimension;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;

import org.apache.poi.hslf.model.TextRun;
import org.apache.poi.hslf.usermodel.RichTextRun;
import org.apache.poi.hslf.usermodel.SlideShow;

public class ExportPPT {

public static void main(String[] args) {
// 讀入PPT文件
File file = new File("D:\\UPH.ppt");
doPPTtoImage(file);
}

public static boolean doPPTtoImage(File file) {
boolean isppt = checkFile(file);
if (!isppt) {
System.out.println("The image you specify don't exit!");
return false;
}
try {
FileInputStream is = new FileInputStream(file);
SlideShow ppt = new SlideShow(is);
is.close();
Dimension pgsize = ppt.getPageSize();
org.apache.poi.hslf.model.Slide[] slide = ppt.getSlides();
for (int i = 0; i < slide.length; i++) {
TextRun[] truns = slide[i].getTextRuns();
for (int k = 0; k < truns.length; k++) {
RichTextRun[] rtruns = truns[k].getRichTextRuns();
for (int l = 0; l < rtruns.length; l++) {
rtruns[l].setFontIndex(1);
rtruns[l].setFontName("宋體");
}
}
BufferedImage img = new BufferedImage(pgsize.width, pgsize.height,
BufferedImage.TYPE_INT_RGB);

Graphics2D graphics = img.createGraphics();
graphics.setPaint(Color.BLUE);
graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width, pgsize.height));
slide[i].draw(graphics);

// 這里設置圖片的存放路徑和圖片的格式(jpeg,png,bmp等等),注意生成文件路徑
File path = new File("D:/images");
if (!path.exists()) {
path.mkdir();
}
FileOutputStream out = new FileOutputStream(path + "/" + (i + 1)
+ ".jpg");
javax.imageio.ImageIO.write(img, "jpeg", out);
out.close();
}
System.out.println("success!!");
return true;
} catch (FileNotFoundException e) {
System.out.println(e);
} catch (IOException e) {
}
return false;
}

// function 檢查文件是否為PPT
public static boolean checkFile(File file) {

boolean isppt = false;
String filename = file.getName();
String suffixname = null;
if (filename != null && filename.indexOf(".") != -1) {
suffixname = filename.substring(filename.lastIndexOf("."));
if (suffixname.equals(".ppt")) {
isppt = true;
}
return isppt;
} else {
return isppt;
}
}

}

Ⅶ 求一份Java程序設計的ppt

你是學生嗎?做什麼用的?

Ⅷ 我想做一個介紹java項目的ppt文件,我想知道該如何介紹會好,比如說用到的技術,實現的功能等等

1、需求分析:從功能入手講起,使用用例圖,講清楚用戶需求是什麼;
2、概要設計:根據功能擴展到框架結構設計,這一部分主要是模塊設計;
3、詳細設計:說一說Java的類結構,最好用UML類圖說明
4、重點難點:撿幾個具體的重要技術或演算法談一下
5、運行結果:介紹項目的運行環境以及運行截圖
6、擴展性分析;談談項目的可擴展性與未來展望

Ⅸ eclipse-java讀取ppt

java中讀取ppt的實現方法如下:

public class ReadFileUtils {
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
ReadFileUtils rf = new ReadFileUtils();
String s = "";
// s = rf.readTXT("E:/itsm文檔的後綴名分析報告2.txt");
// s = rf.readPDF("E:/memcached全面剖析.pdf");
// s = rf.readEXCEL("E:/副本工作量及成本模板.xls");
// s = rf.readEXCEL2007("E:/功能點估算方案.xlsx");
// s = rf.readWORD("E:/pms中文.doc");
// s = rf.readWORD2007("E:/功能點估算方法.docx");
//s = rf.readPPT("E:/精細化管理信息系統項目匯報v1.0.ppt");
s = rf.readPPT2007("e:/精細化管理信息系統項目匯報v1.0.pptx");
System.out.println(s);
}

// 讀取ppt
public String readPPT(String file) throws IOException {
StringBuilder sb = new StringBuilder();
SlideShow ppt = new SlideShow(new HSLFSlideShow(file));
Slide[] slides = ppt.getSlides();
//提取文本信息
for (Slide each : slides) {
TextRun[] textRuns = each.getTextRuns();
for (int i=0 ;i< textRuns.length; i++ ) {
RichTextRun[] richTextRuns = textRuns.getRichTextRuns();
for (int j = 0; j < richTextRuns.length; j++) {
sb.append(richTextRuns[j].getText());
}
sb.append("\n");
}
sb.append("\n");
}
return sb.toString();
}

// 讀取pptx
public String readPPT2007(String file) throws IOException, XmlException, OpenXML4JException {
return new XSLFPowerPointExtractor(POIXMLDocument.openPackage(file)).getText();
}

// 讀取xls文件
public String readEXCEL(String file) throws IOException {
StringBuilder content = new StringBuilder();
HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));// 創建對Excel工作簿文件的引用
for (int numSheets = 0; numSheets < workbook.getNumberOfSheets(); numSheets++) {
if (null != workbook.getSheetAt(numSheets)) {
HSSFSheet aSheet = workbook.getSheetAt(numSheets);// 獲得一個sheet
for (int rowNumOfSheet = 0; rowNumOfSheet <= aSheet
.getLastRowNum(); rowNumOfSheet++) {
if (null != aSheet.getRow(rowNumOfSheet)) {
HSSFRow aRow = aSheet.getRow(rowNumOfSheet); // 獲得一個行
for (short cellNumOfRow = 0; cellNumOfRow <= aRow
.getLastCellNum(); cellNumOfRow++) {
if (null != aRow.getCell(cellNumOfRow)) {
HSSFCell aCell = aRow.getCell(cellNumOfRow);// 獲得列值
if (this.convertCell(aCell).length() > 0) {
content.append(this.convertCell(aCell));
}
}
content.append("\n");
}
}
}
}
}
return content.toString();
}

// 讀取xlsx文件
public String readEXCEL2007(String file) throws IOException {
StringBuilder content = new StringBuilder();
XSSFWorkbook workbook = new XSSFWorkbook(file);
for (int numSheets = 0; numSheets < workbook.getNumberOfSheets(); numSheets++) {
if (null != workbook.getSheetAt(numSheets)) {
XSSFSheet aSheet = workbook.getSheetAt(numSheets);// 獲得一個sheet
for (int rowNumOfSheet = 0; rowNumOfSheet <= aSheet
.getLastRowNum(); rowNumOfSheet++) {
if (null != aSheet.getRow(rowNumOfSheet)) {
XSSFRow aRow = aSheet.getRow(rowNumOfSheet); // 獲得一個行
for (short cellNumOfRow = 0; cellNumOfRow <= aRow
.getLastCellNum(); cellNumOfRow++) {
if (null != aRow.getCell(cellNumOfRow)) {
XSSFCell aCell = aRow.getCell(cellNumOfRow);// 獲得列值
if (this.convertCell(aCell).length() > 0) {
content.append(this.convertCell(aCell));
}
}
content.append("\n");
}
}
}
}
}
return content.toString();
}

private String convertCell(Cell cell) {
NumberFormat formater = NumberFormat.getInstance();
formater.setGroupingUsed(false);
String cellValue = "";
if (cell == null) {
return cellValue;
}

switch (cell.getCellType()) {
case HSSFCell.CELL_TYPE_NUMERIC:
cellValue = formater.format(cell.getNumericCellValue());
break;
case HSSFCell.CELL_TYPE_STRING:
cellValue = cell.getStringCellValue();
break;
case HSSFCell.CELL_TYPE_BLANK:
cellValue = cell.getStringCellValue();
break;
case HSSFCell.CELL_TYPE_BOOLEAN:
cellValue = Boolean.valueOf(cell.getBooleanCellValue()).toString();
break;
case HSSFCell.CELL_TYPE_ERROR:
cellValue = String.valueOf(cell.getErrorCellValue());
break;
default:
cellValue = "";
}
return cellValue.trim();
}

// 讀取pdf文件
public String readPDF(String file) throws IOException {
String result = null;
FileInputStream is = null;
PDDocument document = null;
try {
is = new FileInputStream(file);
PDFParser parser = new PDFParser(is);
parser.parse();
document = parser.getPDDocument();
PDFTextStripper stripper = new PDFTextStripper();
result = stripper.getText(document);
} finally {
if (is != null) {
is.close();
}
if (document != null) {
document.close();
}
}
return result;
}

// 讀取doc文件
public String readWORD(String file) throws Exception {
String returnStr = "";
try {
WordExtractor wordExtractor = new WordExtractor(new FileInputStream(new File(file)));
returnStr = wordExtractor.getText();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return returnStr;
}

// 讀取docx文件
public String readWORD2007(String file) throws Exception {
return new XWPFWordExtractor(POIXMLDocument.openPackage(file)).getText();
}

// 讀取txt文件
public String readTXT(String file) throws IOException {
String encoding = ReadFileUtils.get_charset(new File(file));
if (encoding.equalsIgnoreCase("GBK")) {
return FileUtils.readFileToString(new File(file), "gbk");
} else {
return FileUtils.readFileToString(new File(file), "utf8");
}
}

private static String get_charset(File file) throws IOException {
String charset = "GBK";
byte[] first3Bytes = new byte[3];
BufferedInputStream bis = null;
try {
boolean checked = false;
bis = new BufferedInputStream(new FileInputStream(file));
bis.mark(0);
int read = bis.read(first3Bytes, 0, 3);
if (read == -1)
return charset;
if (first3Bytes[0] == (byte) 0xFF && first3Bytes[1] == (byte) 0xFE) {
charset = "UTF-16LE";
checked = true;
} else if (first3Bytes[0] == (byte) 0xFE
&& first3Bytes[1] == (byte) 0xFF) {
charset = "UTF-16BE";
checked = true;
} else if (first3Bytes[0] == (byte) 0xEF
&& first3Bytes[1] == (byte) 0xBB
&& first3Bytes[2] == (byte) 0xBF) {
charset = "UTF-8";
checked = true;
}
bis.reset();
if (!checked) {
// int len = 0;
int loc = 0;

while ((read = bis.read()) != -1) {
loc++;
if (read >= 0xF0)
break;
if (0x80 <= read && read <= 0xBF) // 單獨出現BF以下的,也算是GBK
break;
if (0xC0 <= read && read <= 0xDF) {
read = bis.read();
if (0x80 <= read && read <= 0xBF) // 雙位元組 (0xC0 - 0xDF)
// (0x80
// - 0xBF),也可能在GB編碼內
continue;
else
break;
} else if (0xE0 <= read && read <= 0xEF) {// 也有可能出錯,但是幾率較小
read = bis.read();
if (0x80 <= read && read <= 0xBF) {
read = bis.read();
if (0x80 <= read && read <= 0xBF) {
charset = "UTF-8";
break;
} else
break;
} else
break;
}
}
// System.out.println( loc + " " + Integer.toHexString( read )
// );
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (bis != null) {
bis.close();
}
}
return charset;
}
}

熱點內容
安卓微信現在怎麼掃碼登錄 發布:2024-12-28 02:07:15 瀏覽:942
中國系統安卓蘋果還有什麼 發布:2024-12-28 01:59:28 瀏覽:341
這里的秘密碼是多少 發布:2024-12-28 01:58:07 瀏覽:481
rce訪問 發布:2024-12-28 01:57:58 瀏覽:478
java工程師招生 發布:2024-12-28 01:49:23 瀏覽:603
卡管家源碼 發布:2024-12-28 01:47:56 瀏覽:447
hnmcc文件夾 發布:2024-12-28 01:47:09 瀏覽:257
忘記鎖屏密碼怎麼恢復出廠設置 發布:2024-12-28 01:26:29 瀏覽:214
手機存儲mb什麼意思 發布:2024-12-28 01:26:29 瀏覽:138
qq代掛系統源碼 發布:2024-12-28 00:43:48 瀏覽:377