We consider a wireless network where multiple energy harvesting transmitters communicate with the common receiver in a time-sharing manner. In each slot, a transmitter can either harvest energy or send its data to the receiver. Given a time deadline, the goal is to maximize the sum rate of transmitters under random energy arrivals with both perfect and imperfect channel state information at the receiver. The original sum-rate maximization (SRM) problem is a non-convex mixed integer non-linear program (MINLP). To obtain the optimal scheduling policy, we first reduce the original optimization problem to a convex MINLP and solve it using the generalized Benders decomposition algorithm. We observe that the SRM problem results in an unfair rate allocation among transmitters, i.e., the transmitter closer to the receiver achieves a higher rate than that by the transmitter farther from the receiver. Hence, to induce fairness among transmitters, we consider the minimum-rate maximization (MRM) problem. For the bounded channel estimation error, we obtain a robust scheduling policy by solving the worst-case SRM and MRM problems. Finally, we compare the proposed policies with myopic policies studied in the literature and show that the former outperform the latter in terms of achievable rates.