Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Excel writing and reading with pure c API

Reading and Writing Excel file with pure C api in windows system. tested on windows 2000, hope it can help you:
#ifndef _WINXLS_H_
#define _WINXLS_H_
/*============================================================================*
*      Include Files
*============================================================================*/
#include <windows.h>
#include <Oleauto.h>    /* SysAllocString */
#include <objbase.h>    /* CoCreateInstance, ... */
#pragma comment(lib, "ole32.lib")
#include "mytypes.h"    /* tInt32, ...        */
#include "mydll.h"    /* define EXPORT     */
/*============================================================================*
*    define/typedef/struct
*============================================================================*/
#define DISP_CELL    170
/* XLS file handle */
typedef struct
{
    tChar*        filepath;
    IDispatch*    bookhandle;
    IDispatch*    sheetshandle;
    IDispatch**    sheethandles;    // Array of IDispatch*
    IDispatch**    rangehandles;    // Array of IDispatch*
    tUInt32        sheet_count;
}XLSFILE;
/*============================================================================*
*    Const variables
*============================================================================*/
/*============================================================================*
*    Global variables
*============================================================================*/
/*==============================================


Ïà¹ØÎĵµ£º

¶ÔCµÄprintfº¯ÊýµÄ¿É±ä³¤²ÎÊýʵÏֵķÖÎö

ת×Ô¡¾http://tech.ddvip.com/2008-08/121825219252306_3.html¡¿
ÄÚÈÝÕªÒª£ºÒ»Ö±ÒÔÀ´¶¼¾õµÃprintfËƺõÊÇcÓïÑÔ¿âÖй¦ÄÜ×îÇ¿´óµÄº¯ÊýÖ®Ò»£¬²»½öÒòΪËüÄܸñʽ»¯Êä³ö£¬¸üÔÚÓÚËüµÄ²ÎÊý¸öÊýûÓÐÏÞÖÆ£¬Òª¼¸¸ö¾Í¸ø¼¸¸ö£¬À´Õß²»¾Ü¡£printfÕâÖÖ¶Ô²ÎÊý¸öÊýºÍ²ÎÊýÀàÐ͵ÄÇ¿´óÊÊÓ¦ÐÔ£¬ÈÃÈ˲úÉúÁ˶ÔËü½øÐÐ̽Ë÷µÄŨºñÐËȤ¡£
¡¾1. ʹÓÃÇéÐ ......

¡¾ÌâÄ¿4¡¿ÈçºÎ×Ô¼ºÊµÏÖCº¯Êýstrstr()

½âÌâ˼·£º Õâ¸öÍøÂçÉÏÒѾ­Óкܶà´ð°¸£¬ÕâÀï
ÁоÙÒ»¸ö¸´ÔÓ¶ÈΪ0(m*n)µÄÀý×Ó¡£ÊµÏÖµÄÔ­Àí
ºÜ¼òµ¥£¬Ë³Ðò±éÀúÒª²éÕÒµÄ×Ö·û´®£¬Èç¹ûûÓÐÕÒ
µ½£¬×Ö·û´®Ö¸ÕëÍùǰһ룬ÔÙÍùºó±È½ÏÒª²éÕÒµÄ
×Ö·û´®£¨Ä£Ê½´®£©£¬ÈçÏÂͼËùʾ£º
a b c d  d  d a d a c a b d a d d d a d c k
     &nbs ......

Exper C Programming ÁãÁãɢɢ

1.
¹ØÓÚchar* ºÍconst char*ÒÔ¼°char**ºÍconst char**·Ö±ð×÷Ϊʵ²ÎºÍÐβεÄÎÊÌâ
´«ÖµÊµ¼ÊÉÏÊÇÀàËÆÓÚ¸³ÖµµÄ¡£
Á½¸ö²Ù×÷Êý¶¼ÊÇÖ¸ÏòÏÞ¶¨·û»òÎÞÏÞ¶¨·ûµÄÏàÈÝÀàÐ͵ÄÖ¸Õ룬×ó±ßÖ¸ÕëËùÖ¸ÏòµÄÀàÐͱØÐë¾ßÓÐÓÒ±ßÖ¸ÕëËùÖ¸ÏòÀàÐ͵ÄÈ«²¿ÏÞ¶¨·û¡£ ......

LinuxÏÂC¿ª·¢Ö®gcc,gdbµÄʹÓÃ

gcc£¬gdbµÄʹÓÃ
×÷Õߣºzccst
 
ÉÏÖÜÎåÔÚͼÊé¹Ý½èÁËÒ»±¾¡¶LinuxÈí¼þ¹¤³Ìʦ£¨CÓïÑÔ£©ÊµÓý̡̳·£¬ÈÃÎÒÊÕ»ñÁ¼¶à¡£²»½ö½öÊÇÊéÖеÄ֪ʶ£¬»¹ÓжÔ֪ʶÌåϵºÍ¼Ü¹¹ÈÏʶµÄÉîÈë¡£
 
LinuxÏÂC¿ª·¢£º
1£¬gcc,gdbµÄʹÓá£
2£¬MakefileÎļþµÄ±àд¡£
3£¬ÏµÍ³º¯ÊýµÄʹÓÃ
4£¬Îļþ²Ù×÷
5£¬´®ÐÐͨÐÅ
6£¬½ø³Ì¿ØÖÆ
7£¬½ø³Ì¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ