Exemple #1
0
 public override void Write(Book book)
 {
     parser = new Parser(Book.DebugEnabled);
     xlsxFile = new XlsxFile(book.FilePath, parser);
     foreach (string sheetName in xlsxFile.WorksheetNames)
     {
         CreateSheet(book, sheetName);
     }
 }
Exemple #2
0
 internal Sheet(Book book, String sheetName, Director director)
 {
     this.book = book;
     this.sheetName = sheetName;
     this.director = director;
 }
Exemple #3
0
 /// <summary>
 /// 指定されたファイルを読み込み、ブックのインスタンスを取得する。
 /// 
 /// 一度読み込んだファイル内容はキャッシュに蓄えられるため、同一ファイルを指定して
 /// GetInstance を指定した場合、二度目以降はファイルの読み込みは行われない。
 /// </summary>
 /// <param name="filePath">読み込むファイルのパス</param>
 /// <param name="director">ディレクタ</param>
 /// <returns>Book のインスタンス</returns>
 public static Book GetInstance(string filePath, Director director)
 {
     string canonicalPath = Path.GetFullPath(filePath);
     lock (bookMap)
     {
         Book book = null;
         bookMap.TryGetValue(canonicalPath, out book);
         if (book == null)
         {
             book = new Book(canonicalPath, director);
             bookMap[canonicalPath] = book;
         }
         return book;
     }
 }