A polymer gel electrolyte with the cyanoethylated hydroxypropyl cellulose (CN-HPC) as polymer matrix was prepared and applied in dye-sensitized solar cells (DSSCs). The ionic conductivities of the gel electrolytes based on LiI/I2 and 1-methyl-3-hexylimidazolium iodide (MHII)/I2 as the I−/I3 − redox couple were determined, being 2.94mScm−1 and 2.46mScm−1 with the respective diffusion constants of I3 − (D app) of 2.54×10−6 cm2 S−1, 2.15×10−6 cm2 S−1. Under the optimized condition, the overall conversion efficiencies of quasi-solid DSSCs were determined to be 7.40% based on a triphenylamine dye (SD2) and 7.55% based on a ruthenium dye (N719), which is 94% of those with liquid electrolyte.