【s理论k组指标源码】【myxls源码】【chromiumdr源码】WFC源码
1.golang读åè¶
大excelï¼
2.import com.ms.wfc.app.*;
3.JAVAè¯è¨çåå²ï¼
4.一个好的程序员至少应该具备哪些条件?
golang读åè¶ å¤§excelï¼
Golang-tealeg/xlsxæä½excelæ件
åè§?
å表æ¶å¨å¾ªç¯ä¸çcell
åºè¯¥æ°å£°æçåévarcell1*xlsx.Cellå§
ç¶åä¸é¢ç¨cell1åéåå¼
ä¸ç¶å¥½ååä¸è¿å»
使ç¨çæ¹æ³ï¼sheet.SetColWidth(1,1,.0)
//Setthewidthofarangeofcolumns.
//minå¼å§çåï¼maxç»æçå
//eg:ï¼1,1,ï¼ç¬¬ä¸è¡è®¾ç½®ä¸º
//?ï¼1,3,ï¼ç¬¬ä¸è¡å°ç¬¬ä¸è¡è®¾ç½®ä¸º
//éè¿è®¾ç½®å¤æ¡ï¼è¾¾å°è®¾ç½®å ¨é¨åç宽度çç®ç
func(s*Sheet)SetColWidth(min,maxint,widthfloat)
å¦
golangæä¹éè¿æ°æ®æµç´æ¥çæexcelä¸ä¼ è³ossimportjava.io.*;importjxl.*;â¦â¦â¦â¦try{ //æ建Workbook对象,åªè¯»Workbook对象//ç´æ¥ä»æ¬å°æ件å建Workbook//ä»è¾å ¥æµå建WorkbookInputStreamis=newFileInputStream(sourcefile);jxl.Workbookrwb=Workbook.getWorkbook(is);}catch(Exceptione){ e.printStackTrace();}ä¸æ¦å建äºWorkbookï¼æ们就å¯ä»¥éè¿å®æ¥è®¿é®ExcelSheet(æ¯è¯ï¼å·¥ä½è¡¨)ãåèä¸é¢ç代ç ç段ï¼//è·å第ä¸å¼ Sheet表Sheetrs=rwb.getSheet(0);æ们æ¢å¯è½éè¿Sheetçå称æ¥è®¿é®å®ï¼ä¹å¯ä»¥éè¿ä¸æ æ¥è®¿é®å®ãå¦æéè¿ä¸æ æ¥è®¿é®çè¯ï¼è¦æ³¨æçä¸ç¹æ¯ä¸æ ä»0å¼å§ï¼å°±åæ°ç»ä¸æ ·ãä¸æ¦å¾å°äºSheetï¼æ们就å¯ä»¥éè¿å®æ¥è®¿é®ExcelCell(æ¯è¯ï¼åå æ ¼)ãåèä¸é¢ç代ç ç段ï¼//è·å第ä¸è¡ï¼ç¬¬ä¸åçå¼Cellc=rs.getCell(0,0);Stringstrc=c.getContents();//è·å第ä¸è¡ï¼ç¬¬äºåçå¼Cellc=rs.getCell(1,0);Stringstrc=c.getContents();//è·å第äºè¡ï¼ç¬¬äºåçå¼Cellc=rs.getCell(1,1);Stringstrc=c.getContents();System.out.println("Cell(0,0)"+"value:"+strc+";type:"+c.getType());System.out.println("Cell(1,0)"+"value:"+strc+";type:"+c.getType());System.out.println("Cell(1,1)"+"value:"+strc+";type:"+c.getType());å¦æä» ä» æ¯åå¾Cellçå¼ï¼æ们å¯ä»¥æ¹ä¾¿å°éè¿getContents()æ¹æ³ï¼å®å¯ä»¥å°ä»»ä½ç±»åçCellå¼é½ä½ä¸ºä¸ä¸ªå符串è¿åã示ä¾ä»£ç ä¸Cell(0,0)æ¯ææ¬åï¼Cell(1,0)æ¯æ°ååï¼Cell(1,1)æ¯æ¥æåï¼éè¿getContents()ï¼ä¸ç§ç±»åçè¿åå¼é½æ¯å符åãå¦ææéè¦ç¥éCellå 容çç¡®åç±»åï¼APIä¹æä¾äºä¸ç³»åçæ¹æ³ãåèä¸é¢ç代ç ç段ï¼Stringstrc=null;doublestrc=0.;Datestrc=null;Cellc=rs.getCell(0,0);Cellc=rs.getCell(1,0);Cellc=rs.getCell(1,1);if(c.getType()==CellType.LABEL){ LabelCelllabelc=(LabelCell)c;strc=labelc.getString();}if(c.getType()==CellType.NUMBER){ NmberCellnumc=(NumberCell)c;strc=numc.getValue();}if(c.getType()==CellType.DATE){ DateCelldatec=(DateCell)c;strc=datec.getDate();}System.out.println("Cell(0,0)"+"value:"+strc+";type:"+c.getType());System.out.println("Cell(1,0)"+"value:"+strc+";type:"+c.getType());System.out.println("Cell(1,1)"+"value:"+strc+";type:"+c.getType());å¨å¾å°Cell对象åï¼éè¿getType()æ¹æ³å¯ä»¥è·å¾è¯¥åå æ ¼çç±»åï¼ç¶åä¸APIæä¾çåºæ¬ç±»åç¸å¹é ï¼å¼ºå¶è½¬æ¢æç¸åºçç±»åï¼æåè°ç¨ç¸åºçåå¼æ¹æ³getXXX()ï¼å°±å¯ä»¥å¾å°ç¡®å®ç±»åçå¼ãAPIæä¾äºä»¥ä¸åºæ¬ç±»åï¼ä¸Excelçæ°æ®æ ¼å¼ç¸å¯¹åºï¼å¦ä¸å¾æ示ï¼æ¯ç§ç±»åçå ·ä½æä¹ï¼è¯·åè§JavaExcelAPIDocumentãå½ä½ å®æ对Excelçµåè¡¨æ ¼æ°æ®çå¤çåï¼ä¸å®è¦ä½¿ç¨close()æ¹æ³æ¥å ³éå åå建ç对象ï¼ä»¥éæ¾è¯»åæ°æ®è¡¨çè¿ç¨ä¸æå ç¨çå å空é´ï¼å¨è¯»å大éæ°æ®æ¶æ¾å¾å°¤ä¸ºéè¦ãåèå¦ä¸ä»£ç ç段ï¼//æä½å®ææ¶ï¼å ³é对象ï¼éæ¾å ç¨çå å空é´rwb.close();JavaExcelAPIæä¾äºè®¸å¤è®¿é®Excelæ°æ®è¡¨çæ¹æ³ï¼å¨è¿éæåªç®è¦å°ä»ç»å 个常ç¨çæ¹æ³ï¼å ¶å®çæ¹æ³è¯·åèéå½ä¸çJavaExcelAPIDocumentã?Workbookç±»æä¾çæ¹æ³1.intgetNumberOfSheets()è·å¾å·¥ä½èï¼Workbookï¼ä¸å·¥ä½è¡¨ï¼Sheetï¼ç个æ°ï¼ç¤ºä¾ï¼jxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));intsheets=rwb.getNumberOfSheets();2.Sheet[]getSheets()è¿åå·¥ä½èï¼Workbookï¼ä¸å·¥ä½è¡¨ï¼Sheetï¼å¯¹è±¡æ°ç»ï¼ç¤ºä¾ï¼jxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));Sheet[]sheets=rwb.getSheets();3.StringgetVersion()è¿åæ£å¨ä½¿ç¨çAPIççæ¬å·ï¼å¥½åæ¯æ²¡ä»ä¹å¤ªå¤§çä½ç¨ãjxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));StringapiVersion=rwb.getVersion();?Sheetæ¥å£æä¾çæ¹æ³1.StringgetName()è·åSheetçå称ï¼ç¤ºä¾ï¼jxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));jxl.Sheetrs=rwb.getSheet(0);StringsheetName=rs.getName();2.intgetColumns()è·åSheet表ä¸æå å«çæ»åæ°ï¼ç¤ºä¾ï¼jxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));jxl.Sheetrs=rwb.getSheet(0);intrsColumns=rs.getColumns();3.Cell[]getColumn(intcolumn)è·åæä¸åçææåå æ ¼ï¼è¿åçæ¯åå æ ¼å¯¹è±¡æ°ç»ï¼ç¤ºä¾ï¼jxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));jxl.Sheetrs=rwb.getSheet(0);Cell[]cell=rs.getColumn(0);4.intgetRows()è·åSheet表ä¸æå å«çæ»è¡æ°ï¼ç¤ºä¾ï¼jxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));jxl.Sheetrs=rwb.getSheet(0);intrsRows=rs.getRows();5.Cell[]getRow(introw)è·åæä¸è¡çææåå æ ¼ï¼è¿åçæ¯åå æ ¼å¯¹è±¡æ°ç»ï¼ç¤ºä¾åï¼jxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));jxl.Sheetrs=rwb.getSheet(0);Cell[]cell=rs.getRow(0);6.CellgetCell(intcolumn,introw)è·åæå®åå æ ¼ç对象å¼ç¨ï¼éè¦æ³¨æçæ¯å®ç两个åæ°ï¼ç¬¬ä¸ä¸ªæ¯åæ°ï¼ç¬¬äºä¸ªæ¯è¡æ°ï¼è¿ä¸é常çè¡ãåç»åæäºä¸åãjxl.Workbookrwb=jxl.Workbook.getWorkbook(newFile(sourcefile));jxl.Sheetrs=rwb.getSheet(0);Cellcell=rs.getCell(0,0);çææ°çExcelå·¥ä½èä¸é¢ç代ç 主è¦æ¯å大家ä»ç»å¦ä½çæç®åçExcelå·¥ä½è¡¨ï¼å¨è¿éåå æ ¼çå 容æ¯ä¸å¸¦ä»»ä½ä¿®é¥°ç(å¦ï¼åä½ï¼é¢è²çç)ï¼ææçå 容é½ä½ä¸ºå符串åå ¥ã(å®æ´ä»£ç è§ExcelWriting.java)ä¸è¯»åExcelå·¥ä½è¡¨ç¸ä¼¼ï¼é¦å è¦ä½¿ç¨Workbookç±»çå·¥åæ¹æ³å建ä¸ä¸ªå¯åå ¥çå·¥ä½è(Workbook)对象ï¼è¿éè¦æ³¨æçæ¯ï¼åªè½éè¿APIæä¾çå·¥åæ¹æ³æ¥å建Workbookï¼èä¸è½ä½¿ç¨WritableWorkbookçæé å½æ°ï¼å 为类WritableWorkbookçæé å½æ°ä¸ºprotectedç±»åã示ä¾ä»£ç ç段å¦ä¸ï¼importjava.io.*;importjxl.*;importjxl.write.*;â¦â¦â¦â¦try{ //æ建Workbook对象,åªè¯»Workbook对象//Method1ï¼å建å¯åå ¥çExcelå·¥ä½èjxl.write.WritableWorkbookwwb=Workbook.createWorkbook(newFile(targetfile));//Method2ï¼å°WritableWorkbookç´æ¥åå ¥å°è¾åºæµ/*OutputStreamos=newFileOutputStream(targetfile);jxl.write.WritableWorkbookwwb=Workbook.createWorkbook(os);*/}catch(Exceptione){ e.printStackTrace();}APIæä¾äºä¸¤ç§æ¹å¼æ¥å¤çå¯åå ¥çè¾åºæµï¼ä¸ç§æ¯ç´æ¥çææ¬å°æ件ï¼å¦ææ件åä¸å¸¦å ¨è·¯å¾çè¯ï¼ç¼ºççæ件ä¼å®ä½å¨å½åç®å½ï¼å¦ææ件å带æå ¨è·¯å¾çè¯ï¼åçæçExcelæ件åä¼å®ä½å¨ç¸åºçç®å½ï¼å¦å¤ä¸ç§æ¯å°Excel对象ç´æ¥åå ¥å°è¾åºæµï¼ä¾å¦ï¼ç¨æ·éè¿æµè§å¨æ¥è®¿é®Webæå¡å¨ï¼å¦æHTTP头设置æ£ç¡®çè¯ï¼æµè§å¨èªå¨è°ç¨å®¢æ·ç«¯çExcelåºç¨ç¨åºï¼æ¥æ¾ç¤ºå¨æçæçExcelçµåè¡¨æ ¼ãæ¥ä¸æ¥å°±æ¯è¦å建工ä½è¡¨ï¼å建工ä½è¡¨çæ¹æ³ä¸å建工ä½èçæ¹æ³å ä¹ä¸æ ·ï¼åæ ·æ¯éè¿å·¥å模å¼æ¹æ³è·å¾ç¸åºç对象ï¼è¯¥æ¹æ³éè¦ä¸¤ä¸ªåæ°ï¼ä¸ä¸ªæ¯å·¥ä½è¡¨çå称ï¼å¦ä¸ä¸ªæ¯å·¥ä½è¡¨å¨å·¥ä½èä¸çä½ç½®ï¼åèä¸é¢ç代ç ç段ï¼//å建Excelå·¥ä½è¡¨jxl.write.WritableSheetws=wwb.createSheet("TestSheet1",0);"è¿é ä¹æ¯å¥½äºï¼ææä¹åå¤é½å ¨äºï¼å¯ä»¥å¼å§ä¸é äºï¼"ï¼ç°å¨è¦åçåªæ¯å®ä¾åAPIææä¾çExcelåºæ¬æ°æ®ç±»åï¼å¹¶å°å®ä»¬æ·»å å°å·¥ä½è¡¨ä¸å°±å¯ä»¥äºï¼åèä¸é¢ç代ç ç段ï¼//1.æ·»å Label对象jxl.write.LabellabelC=newjxl.write.Label(0,0,"ThisisaLabelcell");ws.addCell(labelC);//æ·»å 带æååFormattingç对象jxl.write.WritableFontwf=newjxl.write.WritableFont(WritableFont.TIMES,,WritableFont.BOLD,true);jxl.write.WritableCellFormatwcfF=newjxl.write.WritableCellFormat(wf);jxl.write.LabellabelCF=newjxl.write.Label(1,0,"ThisisaLabelCell",wcfF);ws.addCell(labelCF);//æ·»å 带æåä½é¢è²Formattingç对象jxl.write.WritableFontwfc=newjxl.write.WritableFont(WritableFont.ARIAL,,WritableFont.NO_BOLD,false,UnderlineStyle.NO_UNDERLINE,jxl.format.Colour.RED);jxl.write.WritableCellFormatwcfFC=newjxl.write.WritableCellFormat(wfc);jxl.write.LabellabelCFC=newjxl.write.Label(1,0,"ThisisaLabelCell",wcfFC);ws.addCell(labelCF);//2.æ·»å Number对象jxl.write.NumberlabelN=newjxl.write.Number(0,1,3.);ws.addCell(labelN);//æ·»å 带æformattingçNumber对象jxl.write.NumberFormatnf=newjxl.write.NumberFormat("#.##");jxl.write.WritableCellFormatwcfN=newjxl.write.WritableCellFormat(nf);jxl.write.NumberlabelNF=newjxl.write.Number(1,1,3.,wcfN);ws.addCell(labelNF);//3.æ·»å Boolean对象jxl.write.BooleanlabelB=newjxl.write.Boolean(0,2,false);ws.addCell(labelB);//4.æ·»å DateTime对象jxl.write.DateTimelabelDT=newjxl.write.DateTime(0,3,newjava.util.Date());ws.addCell(labelDT);//æ·»å 带æformattingçDateFormat对象jxl.write.DateFormatdf=newjxl.write.DateFormat("ddMMyyyyhh:mm:ss");jxl.write.WritableCellFormatwcfDF=newjxl.write.WritableCellFormat(df);jxl.write.DateTimelabelDTF=newjxl.write.DateTime(1,3,newjava.util.Date(),wcfDF);ws.addCell(labelDTF);è¿éæ两ç¹å¤§å®¶è¦å¼èµ·å¤§å®¶ç注æã第ä¸ç¹ï¼å¨æé åå æ ¼æ¶ï¼åå æ ¼å¨å·¥ä½è¡¨ä¸çä½ç½®å°±å·²ç»ç¡®å®äºãä¸æ¦å建åï¼åå æ ¼çä½ç½®æ¯ä¸è½å¤åæ´çï¼å°½ç®¡åå æ ¼çå 容æ¯å¯ä»¥æ¹åçã第äºç¹ï¼åå æ ¼çå®ä½æ¯æç §ä¸é¢è¿æ ·çè§å¾(column,row)ï¼èä¸ä¸æ é½æ¯ä»0å¼å§ï¼ä¾å¦ï¼A1被åå¨å¨(0,0)ï¼B1被åå¨å¨(1,0)ãæåï¼ä¸è¦å¿è®°å ³éæå¼çExcelå·¥ä½è对象ï¼ä»¥éæ¾å ç¨çå åï¼åè§ä¸é¢ç代ç ç段ï¼//åå ¥Exelå·¥ä½è¡¨wwb.write();//å ³éExcelå·¥ä½è对象wwb.close();è¿å¯è½ä¸è¯»åExcelæ件çæä½æå°å°ä¸åï¼å¨å ³éExcel对象ä¹åï¼ä½ å¿ é¡»è¦å è°ç¨write()æ¹æ³ï¼å 为å åçæä½é½æ¯åå¨å¨ç¼åä¸çï¼æ以è¦éè¿è¯¥æ¹æ³å°æä½çå 容ä¿åå¨æ件ä¸ãå¦æä½ å å ³éäºExcel对象ï¼é£ä¹åªè½å¾å°ä¸å¼ 空çå·¥ä½èäºãæ·è´ãæ´æ°Excelå·¥ä½èæ¥ä¸æ¥ç®è¦ä»ç»ä¸ä¸å¦ä½æ´æ°ä¸ä¸ªå·²ç»åå¨çå·¥ä½èï¼ä¸»è¦æ¯ä¸é¢äºæ¥æä½ï¼ç¬¬ä¸æ¥æ¯æé åªè¯»çExcelå·¥ä½èï¼ç¬¬äºæ¥æ¯å©ç¨å·²ç»å建çExcelå·¥ä½èå建æ°çå¯åå ¥çExcelå·¥ä½èï¼åèä¸é¢ç代ç ç段ï¼(å®æ´ä»£ç è§ExcelModifying.java)//å建åªè¯»çExcelå·¥ä½èç对象jxl.Workbookrw=jxl.Workbook.getWorkbook(newFile(sourcefile));//å建å¯åå ¥çExcelå·¥ä½è对象jxl.write.WritableWorkbookwwb=Workbook.createWorkbook(newFile(targetfile),rw);//读å第ä¸å¼ å·¥ä½è¡¨jxl.write.WritableSheetws=wwb.getSheet(0);//è·å¾ç¬¬ä¸ä¸ªåå æ ¼å¯¹è±¡jxl.write.WritableCellwc=ws.getWritableCell(0,0);//å¤æåå æ ¼çç±»å,ååºç¸åºç转åif(wc.getType()==CellType.LABEL){ Labell=(Label)wc;l.setString("Thevaluehasbeenmodified.");}//åå ¥Excel对象wwb.write();//å ³éå¯åå ¥çExcel对象wwb.close();//å ³éåªè¯»çExcel对象rw.close();ä¹æ以使ç¨è¿ç§æ¹å¼æ建Excel对象ï¼å®å ¨æ¯å 为æççåå ï¼å 为ä¸é¢ç示ä¾ææ¯APIç主è¦åºç¨ã为äºæé«æ§è½ï¼å¨è¯»åå·¥ä½è¡¨æ¶ï¼ä¸æ°æ®ç¸å ³çä¸äºè¾åºä¿¡æ¯ï¼ææçæ ¼å¼ä¿¡æ¯ï¼å¦ï¼åä½ãé¢è²ççï¼æ¯ä¸è¢«å¤ççï¼å 为æ们çç®çæ¯è·å¾è¡æ°æ®çå¼ï¼æ¢ä½¿æ²¡æäºä¿®é¥°ï¼ä¹ä¸ä¼å¯¹è¡æ°æ®çå¼äº§çä»ä¹å½±åãå¯ä¸çä¸å©ä¹å¤å°±æ¯ï¼å¨å åä¸ä¼åæ¶ä¿å两个åæ ·çå·¥ä½è¡¨ï¼è¿æ ·å½å·¥ä½è¡¨ä½ç§¯æ¯è¾å¤§æ¶ï¼ä¼å ç¨ç¸å½å¤§çå åï¼ä½ç°å¨å¥½åå åç大å°å¹¶ä¸æ¯ä»ä¹å ³é®å ç´ äºãä¸æ¦è·å¾äºå¯åå ¥çå·¥ä½è¡¨å¯¹è±¡ï¼æ们就å¯ä»¥å¯¹åå æ ¼å¯¹è±¡è¿è¡æ´æ°çæä½äºï¼å¨è¿éæ们ä¸å¿ è°ç¨APIæä¾çadd()æ¹æ³ï¼å 为åå æ ¼å·²ç»äºå·¥ä½è¡¨å½ä¸ï¼æ以æ们åªéè¦è°ç¨ç¸åºçsetXXX()æ¹æ³ï¼å°±å¯ä»¥å®ææ´æ°çæä½äºãå°½åå æ ¼åæçæ ¼å¼å修饰æ¯ä¸è½å»æçï¼æ们è¿æ¯å¯ä»¥å°æ°çåå æ ¼ä¿®é¥°å ä¸å»ï¼ä»¥ä½¿åå æ ¼çå 容以ä¸åçå½¢å¼è¡¨ç°ãæ°çæçå·¥ä½è¡¨å¯¹è±¡æ¯å¯åå ¥çï¼æ们é¤äºæ´æ°åæçåå æ ¼å¤ï¼è¿å¯ä»¥æ·»å æ°çåå æ ¼å°å·¥ä½è¡¨ä¸ï¼è¿ä¸ç¤ºä¾2çæä½æ¯å®å ¨ä¸æ ·çãæåï¼ä¸è¦å¿è®°è°ç¨write()æ¹æ³ï¼å°æ´æ°çå 容åå ¥å°æ件ä¸ï¼ç¶åå ³éå·¥ä½è对象ï¼è¿éæ两个工ä½è对象è¦å ³éï¼ä¸ä¸ªæ¯åªè¯»çï¼å¦å¤ä¸ä¸ªæ¯å¯åå ¥çãå°ç»æ¬æåªæ¯å¯¹JavaExcelAPIä¸å¸¸ç¨çæ¹æ³ä½äºä»ç»ï¼è¦æ³æ´è¯¦å°½å°äºè§£APIï¼è¯·å¤§å®¶åèAPIææ¡£ï¼ææºä»£ç ãJavaExcelAPIæ¯ä¸ä¸ªå¼æ¾æºç 项ç®ï¼è¯·å¤§å®¶å ³æ³¨å®çææ°è¿å±ï¼æå ´è¶£çæåä¹å¯ä»¥ç³è¯·å å ¥è¿ä¸ªé¡¹ç®ï¼æè æ¯æåºå®è´µçæè§ã
Golangæä½xlsxæ件github.com/cuishu/excelæ¯ç¨æ¥è¾ å©æä½xlsxæ件çåºï¼å®ç°äºxlsxæ件ågo对象çæ å°ï¼ä½¿æä½xlsxæ件å¦åæä½go对象ä¸æ ·ç®åã
ä¾èµgithub.com/EntSecGroup-Skylar/excelize/v2
excelæ件ç第ä¸è¡å¿ é¡»åGostructçtagä¸è´
Forexample
æ°å»ºä¸ä¸ªæ件ï¼å为a.xlsx
Sheet1ç»æå¦ä¸
读åSheet
å°gosliceåå ¥excelæ件
æ¯æçæ°æ®ç±»å
å¦ææ件æä¸æ¢ä¸ä¸ªSheetï¼åºè¯¥ä½¿ç¨ä¸ä¸ªç»ææ¥æ å°å®ä»¬ã
ä¾
æ¨å¯ä»¥ä½¿ç¨èªå®ä¹ç±»åæ¥å®ç°MarshalXLSXåUnmarshalXLSXæ¥å®ç°ç±»å转æ¢ã
ä¾
import com.ms.wfc.app.*;
éç Visual J++reg; 6.0 æ°å¹´åçåè¡ï¼Java ç¨åºåå¯ä»¥ä½¿ç¨ä¸ä¸ªç§°ä¸º Windows åºç¡ç±» (WFC) çåºæ¥æä¾æ´ä¸ºä¸°å¯çç¨æ·çé¢ãæ¤åºè¿ä¸ºå端ç¼ç¨è®¿é®ç¡¬ä»¶åå ¶ä»å¤é¨æ¥å£æä¾äºæ´ä¸ºå¼ºå¤§çåè½ï¼ä½¿ Java ç¨åºåå¯ä»¥è·å¾æ´é«çç产ç并缩ç产åææ¾å¸åºçæ¶é´ã
WFC ä½ç³»ç»æ
WFC åºæ¯ä¸ç»è½¯ä»¶å ãè¿äºè½¯ä»¶å å æ¬ä¸ä¸ªæå¤ä¸ªç±»ï¼è¿äºç±»å°æ¹æ³ååè½ç»ç»ææç¨çç»ãä¸è¡¨ä¸å å«äºä¸äºè¾ä¸ºéè¦ç软件å çæ±æ»ã
软件å å称 软件å åè½
com.ms.wfc.app æ¯æåºç¨ç¨åºæä½ï¼ä¾å¦çº¿ç¨ï¼ã
com.ms.wfc.core æä¾ WFC ç±»çåºç¡ï¼ä¾å¦ç»ä»¶åäºä»¶ï¼ã
com.ms.wfc.data è®¿é® ActiveX æ°æ®å¯¹è±¡åæ°æ®æ ¼å¼ã
com.ms.wfc.data.ui å®ç°åæ¯ææ°æ®ç»å®æ§ä»¶ã
com.ms.wfc.html éè¿å¯¹è±¡æ¨¡å访é®å¨æ HTML å ç´ ã
com.ms.wfc.io æä¾ç¨äºæ件åæ°æ®æµçç±»ã
com.ms.wfc.ui æä¾ç¨æ·çé¢ç»ä»¶çç±»ã
com.ms.wfc.util å æ¬åç§å®ç¨ç¨åºï¼ä¾å¦æ°æ®è½¬æ¢ï¼ã
com.ms.wfc.ui.Penã
com.ms.wfc.ui.Brush çç ç¨äºå©ç¨åç§ç»å¾å·¥å ·çç±»ï¼ä¾å¦ç¬ï¼ã
å¨ä¸è¡¨æå°ç软件å ä¸æä¸ä¸ªå¼å¾ç¹å«çæãcom.ms.wfc.ui 软件å å¯ä»¥æä¾ç¨æ·çé¢ãæ¤è½¯ä»¶å å å«çªä½åæ åæ§ä»¶ï¼ä¾å¦æé®ãææ¬æ¡åæ ç¾ï¼ãå¦ä¸ä¸ªéè¦ç软件å æ¯ com.ms.wfc.dataãå½æ个ç¨åºä½¿ç¨æ¤è½¯ä»¶å å çç±»æ¶ï¼è¯¥åºç¨ç¨åºå¯ä»¥æ¹ä¾¿å°è®¿é®æ°æ®åºï¼ä¾å¦ Microsoft Access å Microsoft SQL Serverï¼ãå¦ä¸ä¸ªå¯¹åºç¨ç¨åºç¨åºåæç¨ç软件å æ¯ com.ms.wfc.htmlãæ¤è½¯ä»¶å å å«å 许 Web æå¡å¨åç»ä»¶ä»ç»æåçãç¼è¯ç Java è¯è¨æºä»£ç ä¸ä»¥ç¼ç¨æ¹å¼çæ Web 页çé¢çç±»ã
JAVAè¯è¨çåå²ï¼
Javaä»è¯çè³ä»ï¼åªæå¹´å·¦å³äºï¼åCï¼C++è¿äºè大å¥æ¯èµ·æ¥å¹´è½»äºå¾å¤ï¼å²å¦ä¸è¯´ä»»ä½äºç©ç产çé½æ¯å¿ ç¶çï¼Javaä¹ä¸ä¾å¤äºï¼Internetçè¿ çåå±å¯¼è´äºJavaçè¿ çåå±ï¼é£å¥æè¯æ¯æä¹è¯´æ¥çï¼æ°´æ¶¨è¹é«ï¼Javaèªç¶æ为ç½ç»ä¸çæå欢è¿çè¯è¨äº,å½ç¶Javaçåå±å¦ä¸æ¹é¢ä¹æ¯é¿æå¨å¾®è½¯åè¿«ä¸ç软件ä¸ççåæäºï¼McNealyï¼SunçCEOãæ»è£å ¼è£äºé¿ãä»æ¾ç»çå²ç说:âæ§æ¯å¾®è½¯æ¯æ们æ¯ä¸ªäººçä»»å¡ãâè¿ä½è±åçç¡ è°·è±éï¼ä¼¼ä¹å¸¦å¤´èµ·ä¹ï¼è¯å¾ç»ç»ä¸ä¸ªå微软éµçº¿èçï¼ä»¥å¯¹æ微软è¿è¡åºå¤§çæææ¯æ¶å¿åãä»æ¶å¸¸å£åºæ人ä¹è¯ï¼å¨å ¬å¼åºå大èçæ¹è¯å¾®è½¯ï¼å¹¶æ¾ç»è¯´å¾®è½¯ç.NETæ¯.NOTï¼
1.Javaç产ç
Javaæ¥èªäºSunå ¬å¸çä¸ä¸ªå«Greenç项ç®, å ¶åå çç®çæ¯ä¸ºå®¶ç¨æ¶è´¹çµ å产åå¼åä¸ä¸ªåå¸å¼ä»£ç ç³»ç», è¿æ ·æ们å¯ä»¥æE-mailåç»çµå°ç®±ã çµè§æºç家ç¨çµå¨, 对å®ä»¬è¿è¡æ§å¶, åå®ä»¬è¿è¡ä¿¡æ¯äº¤æµãå¼å§, åå¤éç¨C++,ä½C++太 å¤æ, å®å ¨æ§å·®, æååºäºC++å¼åä¸ç§æ°çè¯è¨Oak(Javaçå身), Oakæ¯ä¸ç§ç¨äºç½ç»ç 精巧èå®å ¨çè¯è¨, Sunå ¬å¸æ¾ä¾æ¤ææ ä¸ä¸ªäº¤äºå¼çµè§é¡¹ç®, ä½ç»ææ¯è¢«SGIæè´¥ã å¯æçOakå ä¹æ 家å¯å½, æ°å·§è¿æ¶Mark Ardreesenå¼åçMosaicåNetscapeå¯åäºOak项 ç®ç»æå, ä»ä»¬ç¨Javaç¼å¶äºHotJavaæµè§å¨, å¾å°äºSunå ¬å¸é¦å¸æ§è¡å®Scott McNealyç æ¯æ, 触åäºJavaè¿åInternetã Javaçååä¹æä¸äºè¶£é», æä¸å¤©, å ä½Javaæåç»ç ä¼åæ£å¨è®¨è®ºç»è¿ä¸ªæ°çè¯è¨åä»ä¹åå, å½æ¶ä»ä»¬æ£å¨åå¡é¦åçJava(çªå)åå¡,æä¸ ä¸ªäººçµæºä¸å¨è¯´å°±å«Javaææ ·, å¾å°äºå ¶ä»äººçèµèµ, äºæ¯, Javaè¿ä¸ªååå°±è¿æ ·ä¼ å¼äº ã
2.Javaçåå²:å¹´5ææ¥ï¼Javaè¯è¨è¯ç
å¹´1æï¼ç¬¬ä¸ä¸ªJDK-JDK1.0è¯ç
å¹´4æï¼ä¸ªæ主è¦çæä½ç³»ç»ä¾åºåç³æå°å¨å ¶äº§åä¸åµå ¥JAVAææ¯
å¹´9æï¼çº¦8.3ä¸ä¸ªç½é¡µåºç¨äºJAVAææ¯æ¥å¶ä½
å¹´2ææ¥ï¼JDK1.1åå¸
å¹´4æ2æ¥ï¼JavaOneä¼è®®å¬å¼ï¼åä¸è é¾ä¸ä¸äººï¼åå½æ¶å ¨çåç±»ä¼è®®è§æ¨¡ä¹çºªå½
å¹´9æï¼JavaDeveloperConnection社åºæåè¶ è¿åä¸
å¹´2æï¼JDK1.1被ä¸è½½è¶ è¿2,,次
å¹´æ8æ¥ï¼JAVA2ä¼ä¸å¹³å°J2EEåå¸
å¹´6æï¼SUNå ¬å¸åå¸Javaçä¸ä¸ªçæ¬ï¼æ åçãä¼ä¸çåå¾®åçï¼J2SEãJ2EEãJ2MEï¼
å¹´5æ8æ¥ï¼JDK1.3åå¸
å¹´5ææ¥ï¼JDK1.4åå¸
å¹´6æ5æ¥ï¼NOKIA宣å¸ï¼å°å¹´å°åºå®1亿é¨æ¯æJavaçææº
å¹´9ææ¥ï¼J2EE1.3åå¸
å¹´2ææ¥ï¼J2SE1.4åå¸ï¼èªæ¤Javaç计ç®è½åæäºå¤§å¹ æå
å¹´9ææ¥:PMï¼J2SE1.5åå¸ï¼æ¯Javaè¯è¨çåå±å²ä¸çåä¸éç¨ç¢äºä»¶ã为äºè¡¨ç¤ºè¿ä¸ªçæ¬çéè¦æ§ï¼J2SE1.5æ´å为J2SE5.0 é¢å¤è¯ï¼1.微软ä¸Sunççº çº·Javaè¯ççå¹´ï¼æ£æ¯å¾®è½¯å¨è½¯ä»¶äº§ä¸å°ä½è¾¾å°å· å³°çæ¶ä»£ï¼Windows åå¸æ¶çé£å åºé¢ç»äººä»¬çä¸çæ·±å»å°è±¡è³ä»é¾å¿ã尽管å¦æ¤ï¼ä½ä¸ºæåè¶çææ¯é¢è¢ï¼æ¯å°?çè¨ä»ç¶æéå°æ³¨æå°Javaãå½ä»äºè§£äºJavaçä¸äºç»èä¹åï¼ç»äºäºè¿æ ·çè¯ä»·:âJavaæ¯å¾é¿æ¶é´ä»¥æ¥æä¼ç§çç¨åºè®¾è®¡è¯è¨ãâåºäºæ¤ï¼å¾®è½¯äºå¹´3æç³è¯·å¹¶è·å¾äºJava许å¯è¯ã微软对äºJavaçè¿ä¸çæ æ度å¨å½æ¶å¤§å¤§æé«äºäººä»¬å¯¹Javaçå ´è¶£åä¿¡å¿ï¼ä½ä¹æä¸å°äººæ å¿å¾®è½¯ä¼ä¾é èªå·±å¼ºå¤§çå½±ååå¨æ åä¹å¤å¦ç«æ åï¼ä»èç ´åJavaç纯æ´æ§ã
æç¶ï¼ä»å¹´åå¸Visual J++ç第ä¸ä¸ªçæ¬å¼å§ï¼å¾®è½¯å°±å¼å§å¨Javaä¸æºå ¥èªå·±çç§ææ©å±ãè¿æ¯«æ çé®å¼èµ·Sunçé«åº¦éè§ãå¹´æï¼Sunåç¾å½å å·å°æ¹æ³é¢èµ·è¯å¾®è½¯å ¬å¸è¿åä¸¤å ¬å¸å°±å¾®è½¯ä½¿ç¨Javaææ¯æç¾å®çååï¼ææ§å¾®è½¯å ¬å¸å¨èªå·±çJava产åä¸åäºâä¸æ°å½çä¿®æ¹âï¼è¿åäºååä¸æ¿è¯ºåç¨æ·æä¾Javaå ¼å®¹äº§åçæ¡æ¬¾ãè¿ä¸å®å¸æ·æ¥æä¹ ï¼ç´å°å¹´1æåæ¹è¾¾æå解ï¼å¾®è½¯å°ç»§ç»æä¾éç¨Sunå¼åçJavaææ¯çç°æ产åï¼å æ¬æµè¯çï¼ãä¸è¿ï¼Sunæéå¶å°ä» 对å æ¬Java 1.1.4ç微软产åæä¾è®¸å¯ãå°äºå¹´7æï¼å¾®è½¯å ¬å¸æ°ççWindows XPå°ä¸åæ¯æSunçJVMï¼å¹¶ä¸æ¨åºäº.NETå¹³å°ä¸Javaååºæ礼ã
ç°å¨åè¿å¤´å»çï¼å½æ¶çè¿ä¸åºå®å¸å¯¹Javaä¸ç产çäºæ·±è¿çå½±åãå¦æ没æè¿ä¸åºå®å¸ï¼ä¹è®¸å¾å¤Javaç¨åºåé½å¨ä½¿ç¨Visual J++ï¼åºäºWFCå¼åWindows客æ·ç«¯ç¨åºï¼åæ¶ä¸å¾ä¸é¢å¯¹è¢«ä¸¤ä¸ªä¸åçäºå®æ åæåè£çJavaä¸ç,/*个人è¯è®ºï¼è¯·å¿å¼ç¨ä¸ªäººçæ¥å¾®è½¯æç¶è奸巨ç¾ï¼äº§åä¸æä¹æ ·ï¼ä½æ¯æå»å¯¹æçæ¬é¢å´æ¯ä¸è¬çå ¬å¸é¾ä»¥åå°çï¼VJ++è¿ä¸æå害ï¼è®©åæ¥çå¾å¤Javaç¨åºåæ¹è¡ç¨C#äºï¼çä»å¦å害ï¼è¿ä¸ç¹ä¸ççå¾ä½©æï¼æ¯å°ä¹ä¸æ¯å¾æèåçï¼ä¸ä¸ªåï¼ç!!微软å½ç¶ç¥éèªå·±çäºåï¼ç»æè¯å®èµç¹é±äºäºï¼ä¸è¿ç®çå·²ç»è¾¾å°ï¼èµç¹é±æ æè°ï¼åæ£æçæ¯é±å,*/å¹´4æ2 æ¥ï¼Sunä¸å¾®è½¯è¾¾æ亿ç¾å çæ³å¾å解ãå¦æä¸æ¯æäºä¸å¤©ï¼è®¸å¤äººä¼ä»¥ä¸ºè¿æ¯ä¸ä¸ªå¨4æ1æ¥æ人èå¼çç©ç¬ã尽管å½æ¶ææ人é½åæ¯çå°â太é³ä»è¥¿è¾¹åºæ¥äºâé£æ ·å¼ 大äºå´å·´ï¼ä½è¿çç¡®æ¯äºå®ã
æ ¹æ®ä¸¤å®¶å ¬å¸è¾¾æççæåè®®ï¼åæ¹ä¼ä¸ºéç¨å¯¹æ¹çææ¯èæ¯ä»ä¸å©è´¹ç¨ï¼å¾®è½¯åSunæåæ¯ä»3.5亿ç¾å 使ç¨è´¹ï¼Sunåæ¿è¯ºï¼å¦æSunéæ微软çæäºææ¯ï¼ä¹ä¼å微软ä»æ¬¾ã
毫æ çé®ï¼âç§ä¸äºç»âçæ¹å¼å¯¹åæ¹èè¨é½æ¯æ好çç»æãå°±å¨åè®®ç¾ç½²çå½å¤©ï¼å¨ç¾å½æ§éå±±ç±Sunå微软为âæå¼åå¹´æ©æ¨ãæºæåä½â举è¡çæ°é»åå¸ä¼ä¸ï¼å°½ç®¡æ¯å°.çè¨æ²¡æå°åºï¼ä½è¿å¹¶æ²¡æé²ç¢ç°åºçèµ·æ¥å¼å¸¸è½»æ¾çæ°æ°ã麦å å°¼å©åé²å°é»åèªç©¿äºä¸ä»¶å¯ææ ¹å·åºç¹å¾âRed Wingsâæ²æ£çéçè¿å¨æï¼å¹¶è°åäºä¸èµ·å¨åä½å¤§å¦è¯»ä¹¦çç»åï¼éº¦å å°¼å©è¿è¯´:âå½æ¶æ们两人æ¯é常è¦å¥½çæåï¼å½ç¶æ们ä¹æåµæ¶çæ¶åãâ人ä¸äººå½ç¶å¯è½æ为ç»ççç¥å·±ï¼ä½æ¯å ¬å¸ä¸å ¬å¸ä¹é´æçåªè½æ¯å©çä¸çååååã 2.James Gosling
Javaä¹ç¶(ä¸æä¹å欢è¿æ ·ç称å¼ï¼èåï¼ä¸è¿äººæ¯è¾ç¥çå§ï¼åµåµï¼å¤§å¸é½æ¯è¾ç¥çå§)ï¼ ä½ä¸ºJavaä¹ç¶ï¼James Goslingçååå¯è°æ¯è³çè½è¯¦ãå½äººä»¬è¯è®ºä¸ç§ç¼ç¨è¯è¨æ¶ï¼æ»å欢æ带çæä¸èçæ¯é¸¡ä¸èµ·å¸¦ä¸ãJavaå为ä¸å½çç¼ç¨è¯è¨å¦ä¹ è é¤æ¡ä¸æéçé£ä¹å æ ·é¤ç¹ä¸çæµè¡æ¬¾å¼ï¼èªç¶æ¯è®©James Goslingé£å ä¸å·²ãè½ç¶James Goslingç°å¨å·²ç»ä¸æ¯é¢å¯¼Javaåå±æ½®æµçé¢å人ç©äºï¼å为Sunçå¼åè 产åç»çCTOï¼æä¹ç®æ¥ä¹æ¯èº«å± é«ä½äºï¼ä¿äºç¼ 身å§ï¼ä½æ¯è¿å¹¶ä¸å¦¨ç¢å ¶å¯¹äºJavaä¸å¦æ¢å¾çç±æ¤ï¼è¡¨è¾¾çåå¼åæ ·é²æçè§ç¹ï¼å¼åä¸åºåä¸åºçäºè®ºã
James Goslingæ¯å¾ç±Javaçââæ¯åï¼åªæå½ç¶æ¯çä¸ç±èªå·±çå©åçå¢ãJames Goslingä¹æ¯å¾ç±Sunçââæ¯åï¼åªæå½é¢å¯¼çä¸ç±èªå·±çå ¬å¸çå¢ãäºæ¯æ们å¨æ¹è¯.NETçå®å ¨æ§çéä¼å头ï¼å¨è¤æ¬Javaæ§è½çéä¼å头ï¼å¨æ¨å»SWTå¼å车çéä¼å头ï¼å¨ç»NetBeans大å±èµæçéä¼å头ï¼æ们é½çå°äºJames Goslingç身影ãæ 论对éãåè§æè åºæ§ï¼è³å°è¯´æäºGoslingçé²æ个æ§ä¸æ¯«æ²¡æåå°å¹´é¾çå½±åãä¹è®¸ä¹åªæè¿ç§å¤©æèåæ§ç人ç©æè½åé åºJavaè¿è¬ä¼å¤§çè¯è¨æ¥å§ æ¬ææ¥èªCSDNå客ï¼åºå¤ï¼ /iexploiter/posts/.aspx
Artima上有Anders谈C#的系列访谈。MSDN上有一段Anders导游的s理论k组指标源码录像 。有兴趣可以去看
看牛人的myxls源码丰采。
chromiumdr源码